Exemple #1
0
import scramble  # @UnusedImport

from cgev.vray import sdk
from cgev.vray import Renderer


if __name__ == "__main__":
    do_render = False

    in_path = 'C:/work/tmp/vrscenes/root.vrconcat.vrscene'
    out_path = 'C:/work/tmp/vrscenes/test_out.vrscene'
    sn = 'orangeCst@material'
    pn = 'blues|pSphere11|pSphereShape11@node'

    sdk.enableFrameBuffer(True)

    print "CREATE"
    r = Renderer(renderMode='production')
    print "LOAD"
    r.load(in_path)

    if do_render:
        r.start()
        r.waitForImageReady()

    '''
    print "---"
    po = r.plugins[pn]
    print po.material
    print r.plugins[sn]
    po.setValueAsString('material', sn)
Exemple #2
0
# Copyright (c) 2014 ChaosGroup Ltd.
#
#
# Example QWidget for Vray interaction, production mode
#
# You need to install the PySide module to run this example:
# https://pypi.python.org/pypi/PySide

import os
import sys
import scramble  # @UnusedImport

from cgev.vray import sdk as vray
from PySide import QtCore, QtGui

vray.enableFrameBuffer(False)  # @UndefinedVariable


class VrayWidget(QtGui.QWidget):
    ImageReadyEventType = QtCore.QEvent.registerEventType()

    class ImageReadyEvent(QtCore.QEvent):
        def __init__(self):
            iret = VrayWidget.ImageReadyEventType
            QtCore.QEvent.__init__(self, QtCore.QEvent.Type(iret))

    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        mode = 'production'
        rdr = vray.VRayRenderer(renderMode=mode)  # @UndefinedVariable