Houdini Engine for Maya, preSyncCallback and postSyncCallback

   2137   2   0
User Avatar
Member
7 posts
Joined: Oct. 2013
Offline
I'm attempting to drive some python code in Maya on an HDA cook. The preSyncCallback and postSyncCallback look like they would do what i want them to do but i'm not having any luck actually accessing these callbacks. Does anyone have a working example of using these callbacks?
User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
The original intent was to be be able to cache and (re)apply operations applied to the asset outputs. For example, walk the output objects and rename output objects to enforce some naming convention or rearrange the output dag hierarchy. But in any case they are applied only on sync (i.e. when the output objects are re-built, or when the input parm attributes are rebuild)

If you want to get a callback into maya on cook that's harder. When we still supported in-process execution (16.5 and earlier), you could add maya's python lib to your PATH and import the maya command module, but this doesn't work out of process. You could potentially send commands to the maya command port instead - see the maya commandPort command docs for a start.
User Avatar
Member
7 posts
Joined: Oct. 2013
Offline
Thanks for the response! i wasn't aware of maya commandPort but it looks like this might do the trick. I'll try using it and let you know how it goes.
  • Quick Links