Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides information about using Python to script scene modifications between translation and exportation.

 

Page Contents

Table of Contents
maxLevel2
stylecircle

 

Overview

...

The V-Ray scene access Python API allows you to modify the V-Ray scene after it is translated by the V-Ray for NUKE Nuke translator and before it is rendered and/or exported to a .vrscene file. Note that the V-Ray scene may be quite different from its representation in NUKENuke. As such, some knowledge about the way V-Ray translates various NUKE Nuke constructs may be required. One of the best ways to learn this is to study .vrscene files exported by V-Ray for NUKENuke.

The scene access API allows you to expand the V-Ray for NUKE Nuke translator by providing custom translation for constructs that are not recognized by V-Ray, or for modifying the scene before rendering without changing the original NUKE Nuke scene.

You can specify the Python script to be executed in the VRayCommon tab of the Render Settings dialog, in the MEL/Python callbacks rollout. The script is executed right after the scene is translated and before it is rendered and/or exported to a .vrscene file. When rendering an animation, the script is executed just once, before any frame is rendered.

...

exportTexture(textureName) – Export the texture from the NUKE Nuke scene and return the exported plugin. This function can be useful if the texture hasn't been exported while translating the scene.

exportMaterial(materialName) – Export the material from the NUKE Nuke scene and return the exported plugin. This function can be useful if the material hasn't been exported while translating the scene.

...