Announcement

Collapse
No announcement yet.

Does any callback trigger in DR before render?

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

  • Does any callback trigger in DR before render?

    I'm trying to make a small maxscript, preview render mode, which would automaticly loop all settings and change them to lower values for preview. However the problem occurs with DR. The script below works fine when rendering on single machine:

    Code:
    fn createTeapots = (
    	teapot pos:[100,100,0]
    	teapot pos:[100,0,0]
    	teapot pos:[0,100,0]
    	teapot pos:[150,150,0]
    )
    
    callbacks.addScript #preRender "createTeapots ()" id:#test
    However, with DR the callback is called AFTER the scene is sent to slaves, so all slaves will render an empty sccene without the teapots, while my machine will render it with the teapots. Is there any callback that occurs BEFORE scene is sent to slaves?
    http://www.ylilammi.com/

  • #2
    I feel stupid answering my own question but it seems there is another reason why #preRender cannot be used here, quote from maxscript reference:

    In the #preRender callback, you can't change any of the render parameters (height, width, aliasing, etc) and affect the current render sessions
    The easiest way around these problems I came up with is making seperate Render button and using "max quick render" which is practically the same as pressing Render button. This way I can do whatever I want before actually starting the rendering process.[/quote]
    http://www.ylilammi.com/

    Comment


    • #3
      I'm glad you sorted it out; indeed any callbacks are sent after V-Ray has already read all of the settings into its internal structures.

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

      Comment

      Working...
      X