I'm trying to fire a script at render time of an animation that makes larger scale changes to my Maya scene (rendering through Maya, not Vray standalone). Changes are listed below-
-Create/Edit/Delete Vray Object Properties at certain frames
-Modify Vray User Attributes of objects. Targeting by object sets in Maya
The entire script is based around what the current frame that is being rendered. In the Python/Mel callbacks I'm using a python exec() command to execute the the python file via Melscript with the Python("insert python code here") command.
The only way I can seem to return what frame is currently being rendered AT render time is with the "Pre Render Frame MEL" field. All other callback fields seem to fire before the actual key gets shifted making the cmds.currentTime(q=True) command that returns what the current frame is useless to me OR fire after the render is well on it's way. The cmds.currentTime(q=True) is the only way I figure I can pull the current frame information.
So the "Pre Render Frame MEL" is the field I have to use to fire the python script that relies heavily on the cmds.currentTime(q=True) command to dictate what to do with the scene.
Only problem is that this seems to happen after the scene gets exported to Vray... So I can't make dramatic changes to my maya scene pre-render, but after scene translation into vray. Is this a correct assessment?
Would anyone have any idea how I could pull the correct, currently being rendered frame to pass to the python being fired BEFORE the scene gets translated to Vray? Thank you.
-Create/Edit/Delete Vray Object Properties at certain frames
-Modify Vray User Attributes of objects. Targeting by object sets in Maya
The entire script is based around what the current frame that is being rendered. In the Python/Mel callbacks I'm using a python exec() command to execute the the python file via Melscript with the Python("insert python code here") command.
The only way I can seem to return what frame is currently being rendered AT render time is with the "Pre Render Frame MEL" field. All other callback fields seem to fire before the actual key gets shifted making the cmds.currentTime(q=True) command that returns what the current frame is useless to me OR fire after the render is well on it's way. The cmds.currentTime(q=True) is the only way I figure I can pull the current frame information.
So the "Pre Render Frame MEL" is the field I have to use to fire the python script that relies heavily on the cmds.currentTime(q=True) command to dictate what to do with the scene.
Only problem is that this seems to happen after the scene gets exported to Vray... So I can't make dramatic changes to my maya scene pre-render, but after scene translation into vray. Is this a correct assessment?
Would anyone have any idea how I could pull the correct, currently being rendered frame to pass to the python being fired BEFORE the scene gets translated to Vray? Thank you.
Comment