Post translate support

Nightly builds from tomorrow will contain Python “Post Translate” support (ROP → “Post Translate”).

It’s similar to https://docs.chaosgroup.com/display/…ed+V-Ray+Scene, but is based on AppSDK Python binding.

WARNING: AppSDK Python binding gives you FULL control over the rendering process so be very careful.

I’ve added some restriction in VRayRenderer() object creation, but still a lot of methods are available.
I’ll try to limit methods available for “post translate” in the future.

Check some docs about AppSDK:
* Application SDK
* https://docs.chaosgroup.com/vray_app…n27/index.html

Some simple examples:

List scene plugins:

import os
import vray
from vfh import vfh_utils

with vray.VRayRenderer() as renderer:
    for plugin in renderer.plugins:
        vfh_utils.logInfo('plugin ' + plugin.getName() + ' (class ' + plugin.getType() + '):\n')

Change color:

import vray
r = vray.VRayRenderer()
p = r.plugins["|mat|vrayMaterialBuilder|vrayMtl"]
p.diffuse = vray.AColor(0, 1, 1, 1)

If you are not using installer you may have to modify your .json or .env to include path to AppSDK Python binding.
For json it may look like that:


{ "PYTHONPATH" : "${INSTALL_ROOT}/appsdk/python27" },

1 Like