qmasingarbe / pymiere

Python for Premiere pro
GNU General Public License v3.0
367 stars 48 forks source link

query re: "app.openFCPXML(path, projPath)" #52

Closed hedley-david closed 1 year ago

hedley-david commented 2 years ago

Hello,

I love pymiere; it is wonderful! I found something I can't figure out though:

I am completely unable to code "pymiere.objects.app.openFCPXML" correctly. in premiere_objects.py @ line 229, there's:

def openFCPXML(self):
        return self._eval_on_this_object("openFCPXML()")

but the official docs have more arguments found @ 5.2.8 here: https://readthedocs.org/projects/premiere-scripting-guide/downloads/pdf/latest/

app.openFCPXML(path, projPath)

I've tested in on Mac and PC, and I seem to return either too few arguments or provide three.

I would have thought it was this, Mac version: pymiere.objects.app.openFCPXML("foo-path/build.xml", "foo-path/build.proj")

Thank you for any advice you could suggest. ~D.

hedley-david commented 2 years ago

And I sorted it out: use this as line 229 in premiere_objects.py

    def openFCPXML(self, filePath, projectPath):
        self._check_type(filePath, str, 'arg "filePath" of function "Application.openFCPXML"')
        self._check_type(projectPath, str, 'arg "projectPath" of function "Application.openFCPXML"')
        return self._eval_on_this_object("openFCPXML({},{})".format(_format_object_to_es(filePath), _format_object_to_es(projectPath)))
qmasingarbe commented 1 year ago

Hi @hedley-david , Thank you for reporting this issue and providing a fix. It has been applied (67eaf56e796dc500def472fb486eb2b5c4c84672) and is now available in the latest pymiere release 1.4.0 via pip. Again thank you for participating in making pymiere better!