pymiere icon indicating copy to clipboard operation
pymiere copied to clipboard

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

Open hedley-david opened this issue 2 years ago • 1 comments

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 avatar Jun 27 '22 00:06 hedley-david

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)))



hedley-david avatar Jun 27 '22 15:06 hedley-david

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!

qmasingarbe avatar May 02 '23 18:05 qmasingarbe