Python Export Chaser with Args #2001
-
Hey all, I have some example Python code like this (using 0.13 of the Maya USD): import mayaUsd.lib
from pxr import Usd
class PublishAssetExportChaser(mayaUsd.lib.ExportChaser):
def ExportDefault(self):
print("EXPORT DEFAULT", dir(self))
return self.ExportFrame(Usd.TimeCode.Default())
def ExportFrame(self, frame):
print("EXPORT FRAME", frame, dir(self))
return True
def PostExport(self):
print("POST EXPORT", dir(self))
return True
mayaUsd.lib.ExportChaser.Register(PublishAssetExportChaser, "publish_asset") And I want to run the following export command with chaser args: cmds.mayaUSDExport(..., chaser=["publish_asset"], chaserArgs=[("publish_asset", "myarg", 1)]) How would I pass that arg into the class? Or, would it just be better to have a post process that opens the USD scene and makes the required change? From what I understand, the nice thing about the chasers is that I already have the USD scene open and can make changes there. (In my case, I want to change the path to texture files on publish.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Scott. I believe we fixed this in the following PR #1864 which is part of the 0.15.0 version. Cheers, |
Beta Was this translation helpful? Give feedback.
Hi Scott. I believe we fixed this in the following PR #1864 which is part of the 0.15.0 version.
Cheers,
KxL