Announcement

Collapse
No announcement yet.

Current frame drives modifications post translation - Maya/Mel callback

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Current frame drives modifications post translation - Maya/Mel callback

    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.

  • #2
    Hey all. I was able to get this working by executing a start script when Maya boots to render on each of the slaves. Not even using callbacks anymore to get this done.

    Just out of curiosity, wouldn't it make more sense to have the scene translated to the vray core after the "Pre Render Frame MEL" callback, not before it?

    Comment


    • #3
      No, the scene is already translated by the time V-Ray gets to render any specific frame.

      Best regards,
      Vlado
      I only act like I know everything, Rogers.

      Comment

      Working...
      X