VRay SDK for C++
Loading...
Searching...
No Matches
VRay::VRayRenderer Class Reference

#include <vraysdk.hpp>

Classes

struct  UserCameraChanged
 
struct  UserLightChanged
 
struct  UserNodeChanged
 
struct  UserPropertyChanged
 Definition of one changed property for LiveLink scene updates. More...
 
class  VFB
 This class groups all VFB related methods. More...
 
struct  VRayProfiler
 

Public Types

enum class  DebugShadingMode : int {
  isolateSelect , globalLighting , globalAO , globalWireframe ,
  globalNormal , globalUV , globalBarycentric
}
 Enum with the different debug shading modes. More...
 
typedef void * InstanceHandleType
 
enum  RenderMode {
  RENDER_MODE_PRODUCTION = -1 , RENDER_MODE_INTERACTIVE = 0 , RENDER_MODE_INTERACTIVE_CUDA = 4 , RENDER_MODE_INTERACTIVE_OPTIX = 7 ,
  RENDER_MODE_INTERACTIVE_METAL = 8 , RENDER_MODE_PRODUCTION_CUDA = 104 , RENDER_MODE_PRODUCTION_OPTIX = 107 , RENDER_MODE_PRODUCTION_METAL = 108
}
 
enum  UserPropertyType {
  UPType_int = 0 , UPType_bool = 1 , UPType_double = 2 , UPType_float = 3 ,
  UPType_string = 4 , UPType_vector = 5 , UPType_color = 6
}
 Property types for UserPropertyChanged.
 
enum  UserSceneManipType { USMType_Transform_Set = 0 , USMType_Show = 1 , USMType_Hide = 2 }
 
enum  UserSceneNodeObjectType { USNOType_Node = 0 , USNOType_Camera = 1 , USNOType_Light = 2 }
 
enum class  WaitTime : int { AwaitingOrIdle = -1 , Idle = -2 }
 Used with waitForRenderEnd() More...
 

Public Member Functions

 VRayRenderer ()
 
 VRayRenderer (const RendererOptions &rendererOptions)
 
 VRayRenderer (InstanceHandleType handle)
 
 ~VRayRenderer ()
 Destructor.
 
void abort () const
 Flags the image rendering thread to abort and returns immediately (without waiting for it to join)
 
AddHostsResult addHosts (const char *hosts) const
 
AddHostsResult addHosts (const std::string &hosts) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool addVRayProfilerMetadata (const char *category, const char *key, const char *value)
 
bool addVRayProfilerMetadata (const std::string &category, const std::string &key, const std::string &value)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int append (const char *fileName, bool drSendNameOnly=false)
 
int append (const std::string &fileName, bool drSendNameOnly=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int append (const std::vector< const char * > &fileNames)
 
int append (const std::vector< std::string > &fileNames)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendAsText (const char *text)
 
template<typename T = void>
int appendAsText (const char *text, size_t length, void(*freeFn)(char *text, size_t size, T *holderObject)=NULL, T *holderObject=NULL)
 
int appendAsText (const std::string &text)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendAsText (const std::vector< const char * > &sceneTexts)
 
int appendAsText (const std::vector< std::string > &sceneTexts)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendAsText (std::string &&text)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendAsTextFiltered (const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendAsTextFiltered (const char *fileName, T &obj, const void *userData=NULL)
 
int appendAsTextFiltered (const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendAsTextFiltered (const std::string &fileName, T &obj, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendAsTextFiltered (const std::vector< const char * > &sceneTexts, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendAsTextFiltered (const std::vector< const char * > &sceneTexts, T &obj, const void *userData=NULL)
 
int appendAsTextFiltered (const std::vector< std::string > &sceneTexts, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendAsTextFiltered (const std::vector< std::string > &sceneTexts, T &obj, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendFiltered (const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendFiltered (const char *fileName, T &obj, const void *userData=NULL)
 
int appendFiltered (const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendFiltered (const std::string &fileName, T &obj, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int appendFiltered (const std::vector< const char * > &fileNames, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendFiltered (const std::vector< const char * > &fileNames, T &obj, const void *userData=NULL)
 
int appendFiltered (const std::vector< std::string > &fileNames, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int appendFiltered (const std::vector< std::string > &fileNames, T &obj, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void bucketRenderNearest (int x, int y) const
 
bool clearAllPropertyValuesUpToTime (double time)
 Removes all keyframe values at times less than 'time'.
 
void clearLastError ()
 Clears the last error code.
 
bool clearPropertyValuesUpToTime (double time, PluginCategories categories)
 Removes all keyframe values at times less than 'time' only from plugins of given categories.
 
bool clearScene ()
 Wipes the scene contents (all plugin instances). This implicitly calls stop() if necessary.
 
unsigned long long commit ()
 
void continueSequence () const
 When rendering a sequence this starts the next frame after the previous one has completed. It does not continue automatically.
 
bool deletePlugin (const char *pluginName)
 
bool deletePlugin (const Plugin &plugin)
 
bool deletePlugin (const std::string &pluginName)
 
bool deletePlugins (const char *names[], size_t namesCount)
 
bool deletePlugins (const std::vector< std::string > &names)
 
bool deletePlugins (const std::vector< VRay::Plugin > &plugins)
 
template<class T , void(T::*)(VRayRenderer &, VRayImage *, void *) TMethod>
bool denoiseNow (T &object, bool shouldPassImage=true, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool denoiseNow (void(*userCb)(VRayRenderer &, VRayImage *, void *)=0, bool shouldPassImage=true, const void *userData=NULL)
 
bool disableDRClient ()
 
bool enableDRClient (const EnableDRClientParams &enableParams)
 
bool enableLiveLinkClient (const LiveLinkClientParameters &params)
 
int exportScene (const char *filePath) const
 
int exportScene (const char *filePath, const VRayExportSettings &settings) const
 
int exportScene (const std::string &filePath) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int exportScene (const std::string &filePath, const VRayExportSettings &settings) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::string exportSceneToBuffer () const
 
std::string exportSceneToBuffer (const VRayExportSettings &settings) const
 
std::string getActiveHosts () const
 
std::string getAllHosts () const
 
std::vector< std::string > getAllPluginTypes () const
 Returns the class names of all available V-Ray plugin classes loaded from dynamic libraries.
 
bool getAutoCommit () const
 Get the current state of the autoCommit flag.
 
AutoExposureResult getAutoExposureResult () const
 Returns the auto-exposure and auto-white balance values computed during the last light cache calculation.
 
Box getBoundingBox () const
 Returns the current bounding box of the scene.
 
Box getBoundingBox (bool &ok) const
 Returns the current bounding box of the scene.
 
bool getBucketReadyHasBuffer () const
 Gets if an image will be passed in the BucketReady callback parameters.
 
Plugin getCamera () const
 Gets the current camera plugin. Don't use this unless you need to use setCamera() - see the comments on setCamera.
 
const char * getCameraName () const
 Gets the camera name override previously set by setCameraName().
 
size_t getCausticsSize () const
 
unsigned long long getChangeIndex () const
 
std::vector< ComputeDeviceInfogetComputeDevicesCUDA () const
 
std::vector< ComputeDeviceInfogetComputeDevicesCurrentEngine () const
 
std::vector< ComputeDeviceInfogetComputeDevicesDenoiser () const
 
std::vector< ComputeDeviceInfogetComputeDevicesMetal () const
 
std::vector< ComputeDeviceInfogetComputeDevicesOptix () const
 
bool getCropRegion (int &srcWidth, int &srcHeight, float &rgnLeft, float &rgnTop, float &rgnWidth, float &rgnHeight) const
 Gets the virtual crop region (RgnLeft, RgnTop, RgnWidth, RgnHeigt) within a virtual source image space with sizes SrcWidth, SrcHeight.
 
double getCurrentEventTime () const
 Get the current value (in seconds) of the relative time used in event callbacks.
 
int getCurrentFrame () const
 
double getCurrentTime () const
 
bool getDREnabled () const
 
float getIESPrescribedIntensity (const char *iesLightFileName) const
 
float getIESPrescribedIntensity (const std::string &iesLightFileName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
VRayImagegetImage () const
 
VRayImagegetImage (const GetImageOptions &options) const
 
size_t getImageIntoBuffer (const GetImageOptions &options, void *buf) const
 
bool getImageSize (int &width, int &height) const
 Returns the frame buffer width and height.
 
std::string getInactiveHosts () const
 
bool getInProcess () const
 
InstanceHandleType getInstanceHandle () const
 
template<class T >
getInstanceOf () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOf (const char *pluginType) const
 
Plugin getInstanceOf (const std::string &pluginType) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOf (PluginTypeId pluginTypeId) const
 
template<class T >
getInstanceOrCreate ()
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T >
getInstanceOrCreate (const char *pluginName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const char *pluginName, const char *pluginType)
 
Plugin getInstanceOrCreate (const char *pluginName, const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const char *pluginName, PluginTypeId pluginTypeId)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const char *pluginType)
 
template<class T >
getInstanceOrCreate (const std::string &pluginName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const std::string &pluginName, const char *pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const std::string &pluginName, const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const std::string &pluginName, PluginTypeId pluginTypeId)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getInstanceOrCreate (PluginTypeId pluginTypeId)
 
InteractiveStatistics getInteractiveStatistics () const
 Returns some performance statistics from the Interactive (RT) engine.
 
size_t getIrradianceMapSize () const
 
bool getKeepInteractiveRunning () const
 Get the current state of the keepInteractiveRunning flag.
 
Error getLastError () const
 Returns the last error that occurred when a method was called. Use this to understand why a method returned false.
 
ParserError getLastParserError () const
 Returns the parser error that occurred when a scene was last loaded or appended.
 
LicenseError getLicenseError () const
 Returns the license error (if any) that occurred when the renderer was constructed or when rendering was started.
 
size_t getLightCacheSize () const
 
int getNumThreads () const
 Return the number of threads that will be used for rendering. 0 means all CPU logical threads.
 
const RendererOptions getOptions () const
 Return the options used to construct this renderer.
 
template<class T >
getOrCreatePlugin (const char *pluginName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getOrCreatePlugin (const char *pluginName, const char *pluginType)
 
Plugin getOrCreatePlugin (const char *pluginName, const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getOrCreatePlugin (const char *pluginName, PluginTypeId pluginTypeId)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T >
getOrCreatePlugin (const std::string &pluginName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getOrCreatePlugin (const std::string &pluginName, const char *pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getOrCreatePlugin (const std::string &pluginName, const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getOrCreatePlugin (const std::string &pluginName, PluginTypeId pluginTypeId)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
size_t getPhotonMapSize () const
 
Plugin getPlugin (const char *pluginName) const
 
template<class T >
getPlugin (const char *pluginName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin getPlugin (const std::string &pluginName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T >
getPlugin (const std::string &pluginName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
PluginMeta getPluginMeta (const char *pluginClassName) const
 Return static meta information about a given plugin type.
 
PluginMeta getPluginMeta (const PluginTypeId pluginTypeId) const
 Return static meta information about a given plugin type.
 
PluginMeta getPluginMeta (const std::string &pluginClassName) const
 Return static meta information about a given plugin type.
 
std::vector< PlugingetPlugins () const
 Returns all plugin instances in the current scene.
 
template<class T , class RetT = T>
std::vector< RetT > getPlugins () const
 
std::vector< PlugingetPlugins (const char *pluginClassName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< PlugingetPlugins (const std::string &pluginClassName) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< PlugingetPluginsOfCategories (const PluginCategories &categories) const
 Returns all plugin instances that belong to all passed categories.
 
std::vector< PlugingetPluginsOfCategories (const std::vector< PluginCategories > &categories) const
 
std::vector< std::string > getPluginTypesOfCategory (PluginCategory category) const
 
bool getProgresiveImageUpdatedHasBuffer () const
 Gets if an image will be passed in the ProgressiveImageUpdated callback parameters.
 
RenderElements getRenderElements ()
 Returns an object that groups render element management methods.
 
RenderMode getRenderMode () const
 Get the current render mode.
 
bool getRenderRegion (int &rgnLeft, int &rgnTop, int &rgnWidth, int &rgnHeight) const
 
bool getRenderSizes (RenderSizeParams &sizes, bool &regionButtonState) const
 
RendererState getState () const
 
bool getUseAnimatedValuesState () const
 Returns true if setting parameter values adds keyframes and false if it overwrites.
 
bool getVFBContextMenuItemValue (int commandId, int &value) const
 
bool getVisualDebuggerEnabled () const
 Returns whether the Visual Debugger is enabled.
 
bool isAborted () const
 
bool isDRClientEnabled () const
 
bool isFrameSkipped () const
 
bool isRenderEnded () const
 
bool isRenderingInHalfResolution () const
 
bool isSequenceEnded () const
 
int load (const char *fileName)
 
int load (const std::string &fileName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int loadAsText (const char *text)
 
template<typename T = void>
int loadAsText (const char *text, size_t length, void(*freeFn)(char *text, size_t size, T *holderObject)=NULL, T *holderObject=NULL)
 
int loadAsText (const std::string &text)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int loadAsText (std::string &&text)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int loadAsTextFiltered (const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int loadAsTextFiltered (const char *fileName, T &obj, const void *userData=NULL)
 
int loadAsTextFiltered (const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int loadAsTextFiltered (const std::string &fileName, T &obj, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int loadFiltered (const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int loadFiltered (const char *fileName, T &obj, const void *userData=NULL)
 
int loadFiltered (const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int loadFiltered (const std::string &fileName, T &obj, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void lockScene ()
 
template<class T >
newPlugin ()
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T >
newPlugin (const char *pluginName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (const char *pluginName, const char *pluginType)
 
Plugin newPlugin (const char *pluginName, const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (const char *pluginName, PluginTypeId pluginTypeId)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (const char *pluginType)
 
template<class T >
newPlugin (const std::string &pluginName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (const std::string &pluginName, const char *pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (const std::string &pluginName, const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (const std::string &pluginType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Plugin newPlugin (PluginTypeId pluginTypeId)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
 operator bool () const
 
bool operator! () const
 
bool optimizeMaterialGraph (const Plugin &topPlugin)
 
bool pause () const
 
Plugin pickPlugin (int x, int y) const
 
Plugin pickPlugin (int x, int y, int timeout) const
 
std::vector< PickedPluginInfopickPlugins (double x, double y, int maxcount=0, int timeout=-1) const
 
int removeHosts (const char *hosts) const
 
int removeHosts (const std::string &hosts) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void renderSequence () const
 Begins rendering an animation sequence in a separate thread. A non-blocking call.
 
void renderSequence (SubSequenceDesc descriptions[], size_t count) const
 
bool replacePlugin (const Plugin &oldPlugin, const Plugin &newPlugin)
 
int resetHosts (const char *hosts=NULL) const
 
int resetHosts (const std::string &hosts) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool resume () const
 
bool saveCausticsFile (const char *fileName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool saveCausticsFile (const std::string &fileName)
 
bool saveIrradianceMapFile (const char *fileName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool saveIrradianceMapFile (const std::string &fileName)
 
bool saveLightCacheFile (const char *fileName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool saveLightCacheFile (const std::string &fileName)
 
bool savePhotonMapFile (const char *fileName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool savePhotonMapFile (const std::string &fileName)
 
bool serializeScene ()
 
void setAutoCommit (bool autoCommit)
 
int setBitmapCache (bool onOff)
 
void setBucketReadyHasBuffer (bool hasBuffer)
 Sets if an image passed in the BucketReady event parameters is needed. If not, no unnecessary copies would be made.
 
bool setCamera (const Plugin &plugin)
 
void setCameraName (const char *name)
 Camera name override. Current camera is selected internally using the scene_name property of the camera plugins.
 
bool setComputeDevicesCUDA (const std::vector< int > &indices)
 
bool setComputeDevicesCurrentEngine (const std::vector< int > &indices)
 
bool setComputeDevicesDenoiser (const std::vector< int > &indices)
 
bool setComputeDevicesEnvironmentVariable ()
 
bool setComputeDevicesMetal (const std::vector< int > &indices)
 
bool setComputeDevicesOptix (const std::vector< int > &indices)
 
bool setCropRegion (int srcWidth, int srcHeight, float rgnLeft, float rgnTop)
 
bool setCropRegion (int srcWidth, int srcHeight, float rgnLeft, float rgnTop, float rgnWidth, float rgnHeight)
 
bool setCurrentFrame (int frame)
 
bool setCurrentTime (double time)
 
void setDebugShadingSelection (const std::vector< Plugin > &selection)
 
bool setDREnabled (bool drEnabled, bool enableBroadcastListener=true)
 
bool setImageSize (int width, int height, bool resetCropRegion=true, bool resetRenderRegion=true)
 
bool setImprovedDefaultSettings (DefaultsPreset preset=quality_medium)
 
void setIncludePaths (const char *includePaths, bool overwrite=true)
 
void setIncludePaths (const std::string &includePaths, bool overwrite=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool setInProcess (bool inProcess)
 
bool setInteractiveNoiseThreshold (float threshold)
 
bool setInteractiveSampleLevel (int samplesPerPixel)
 
bool setInteractiveTimeout (int timeoutMsec)
 
void setKeepBucketsInCallback (bool keep)
 This method allows you to change the default behavior of keeping an image copy in a BucketReady callback parameter.
 
void setKeepInteractiveRunning (bool keepRunning)
 
void setKeepProgressiveFramesInCallback (bool keep)
 This method allows you to change the default behavior of keeping an image copy in a progressiveImageUpdated callback parameter.
 
bool setNumThreads (int numThreads)
 
template<class T , void(T::*)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData) TMethod>
void setOnBucketFailed (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnBucketFailed (void(*callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData) TMethod>
void setOnBucketInit (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnBucketInit (void(*callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
 
void setOnBucketReady (std::nullptr_t null)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , void(T::*)(VRayRenderer &, int x, int y, const char *host, VRayImage *img, ImagePassType pass, double instant, void *userData) TMethod>
void setOnBucketReady (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , void(T::*)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData) TMethod>
void setOnBucketReady (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnBucketReady (void(&callback)(VRayRenderer &, int x, int y, const char *host, VRayImage *img, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
 
void setOnBucketReady (void(&callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, const char *hostName, double instant, void *userData) TMethod>
void setOnHostConnected (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnHostConnected (void(*callback)(VRayRenderer &, const char *hostName, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, const char *hostName, double instant, void *userData) TMethod>
void setOnHostDisconnected (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnHostDisconnected (void(*callback)(VRayRenderer &, const char *hostName, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &renderer, const char *msg, int errorCode, LicenseUserStatus userStatus, double instant, void *userData) TMethod>
void setOnLicenseError (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnLicenseError (void(*callback)(VRayRenderer &, const char *msg, int errorCode, LicenseUserStatus userStatus, double instant, void *userData), const void *userData=NULL)
 
void setOnLightMixTransferToScene (int(*callback)(VRayRenderer &, const std::vector< LightMixChange > &changes, double instant, void *), const void *userData=NULL)
 
template<class T , int(T::*)(VRayRenderer &, const std::vector< LightMixChange > &lightMixChanges, double instant, void *userData) TMethod>
void setOnLightMixTransferToScene (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , void(T::*)(VRayRenderer &renderer, const char *msg, MessageLevel level, double instant, void *userData) TMethod>
void setOnLogMessage (T &object, MessageLevel minLevel=MessageInfo, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnLogMessage (void(*callback)(VRayRenderer &, const char *msg, MessageLevel level, double instant, void *userData), MessageLevel minLevel=MessageInfo, const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnPostEffectsUpdated (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnPostEffectsUpdated (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, const char *msg, int elementNumber, int elementsCount, double instant, void *userData) TMethod>
void setOnProgress (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnProgress (void(*callback)(VRayRenderer &, const char *msg, int elementNumber, int elementsCount, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, VRayImage *img, unsigned long long changeIndex, ImagePassType pass, double instant, void *userData) TMethod>
void setOnProgressiveImageUpdated (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnProgressiveImageUpdated (void(*callback)(VRayRenderer &, VRayImage *img, unsigned long long changeIndex, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnRendererClose (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnRendererClose (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, const char *propName, double instant, void *userData) TMethod>
void setOnRenderViewChanged (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnRenderViewChanged (void(*callback)(VRayRenderer &, const char *propName, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, RendererState oldState, RendererState newState, double instant, void *userData) TMethod>
void setOnStateChanged (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnStateChanged (void(*callback)(VRayRenderer &, RendererState oldState, RendererState newState, double instant, void *), const void *userData=NULL)
 
void setOnUploadToCollaboration (int(*callback)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *), const void *userData=NULL)
 
template<class T , int(T::*)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *userData) TMethod>
void setOnUploadToCollaboration (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBAddRenderElementToScene (bool(*callback)(VRayRenderer &, VFBRenderElementType type, double instant, void *userData), const void *userData=NULL)
 
template<class T , bool(T::*)(VRayRenderer &, VFBRenderElementType type, double instant, void *userData) TMethod>
void setOnVFBAddRenderElementToScene (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnVFBClosed (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBClosed (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnVFBCopyToHostFrameBufferNotify (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBCopyToHostFrameBufferNotify (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, int enabled, int mode, int selectionLocked, double instant, void *userData) TMethod>
void setOnVFBDebugShadingNotify (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBDebugShadingNotify (void(*callback)(VRayRenderer &, int enabled, DebugShadingMode mode, int selectionLocked, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, bool isRendering, double instant, void *userData) TMethod>
void setOnVFBInteractiveStart (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBInteractiveStart (void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnVFBLayersChanged (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBLayersChanged (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnVFBOpenUpdateNotify (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBOpenUpdateNotify (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, bool isRendering, double instant, void *userData) TMethod>
void setOnVFBPauseIPR (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBPauseIPR (void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, bool isRendering, double, void *userData) TMethod>
void setOnVFBRenderLast (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBRenderLast (void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnVFBSaveSettingsNotify (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBSaveSettingsNotify (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, double instant, void *userData) TMethod>
void setOnVFBShowMessagesWindow (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBShowMessagesWindow (void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, bool isRendering, double instant, void *userData) TMethod>
void setOnVFBUpdateIPR (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVFBUpdateIPR (void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
 
template<class T , void(T::*)(VRayRenderer &, const std::string &outputFile, int fileType, double instant, void *userData) TMethod>
void setOnVRayProfilerWrite (T &object, const void *userData=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setOnVRayProfilerWrite (void(*callback)(VRayRenderer &, const std::string &outputFile, int fileType, double instant, void *), const void *userData=nullptr)
 
void setProgresiveImageUpdatedHasBuffer (bool hasBuffer)
 Sets if an image passed in the ProgressiveImageUpdated event parameters is needed. If not, no unnecessary copies would be made.
 
float setProgressiveImageUpdateDifference (float difference)
 
unsigned long setProgressiveImageUpdateTimeout (unsigned long timeout)
 
bool setRenderMode (RenderMode mode)
 
bool setRenderRegion (int rgnLeft, int rgnTop, int rgnWidth, int rgnHeight)
 
bool setRenderSizes (const RenderSizeParams &sizes, bool regionButtonState)
 
bool setResumableRendering (bool enable, const ResumableRenderingOptions *options)
 
void setUserCameraChangedCB (void(*cb)(const UserCameraChanged *info, void *userData), void *userData)
 
void setUserLightChangedCB (void(*cb)(const UserLightChanged *info, void *userData), void *userData)
 
void setUserNodeChangedCB (void(*cb)(const UserNodeChanged *info, void *userData), void *userData)
 
void setVFBContextMenuItems (const std::vector< VFBContextMenuItem > &items)
 Set menu items for the VFB's context menu.
 
bool setVFBContextMenuItemValue (int commandId, int value)
 
template<class T , void(T::*)(VRayRenderer &, int commandId, int x, int y, void *userData) TMethod>
void setVFBContextMenuSelectedCallback (T &object, const void *userData=NULL)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setVFBContextMenuSelectedCallback (void(*callback)(VRayRenderer &, int commandId, int x, int y, void *userData), const void *userData=NULL)
 
void setVisualDebuggerEnabled (bool enable)
 Enables/Disables the Visual Debugger functionality.
 
void setVRayProfiler (const VRayProfilerSettings &settings)
 
void start () const
 
int startSync () const
 
void stop () const
 Flags the image rendering thread to stop and waits for it to join.
 
bool tryLockScene ()
 
void unlockScene ()
 
bool updateLightingAnalysis ()
 
void useAnimatedValues (bool on)
 
bool waitForRenderEnd (const int timeout) const
 
bool waitForRenderEnd (const WaitTime time=WaitTime::AwaitingOrIdle) const
 
bool waitForSequenceEnd () const
 
bool waitForSequenceEnd (const int timeout) const
 
bool waitForVFBClosed () const
 
bool waitForVFBClosed (const int timeout) const
 

Static Public Member Functions

static bool isActiveState (RendererState value)
 Convenience function for checking if a state value is in the rendering subset (including preparing).
 
static bool isInactiveState (RendererState value)
 Convenience function for checking if a state value is in the idle subset (including IDLE_FRAME_DONE awaiting continue command).
 

Public Attributes

struct VRay::VRayRenderer::VRayProfilerthis
 "property" or "namespace" profiler within VRayRenderer
 
class VRay::VRayRenderer::VFB vfb
 "property" or "namespace" vfb within VRayRenderer
 

Protected Member Functions

int getKeyframeTimes (InstanceId pluginID, const char *propertyName, double *&times) const
 
Internal::VRayRendererNative * getNativeRenderer () const
 
Plugin getPlugin_internal (InstanceId pluginID) const
 
template<class T >
getPlugin_internal (InstanceId pluginID) const
 
InstanceId getPluginId_internal (const char *pluginName, PluginTypeId &outTypeId) const
 
const char * getPluginName_internal (InstanceId pluginID) const
 
AColor getPluginPropertyAColor (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
AColor getPluginPropertyAColor (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
bool getPluginPropertyBool (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
bool getPluginPropertyBool (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
Color getPluginPropertyColor (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
Color getPluginPropertyColor (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
const void * getPluginPropertyDefinition (const char *pluginName, const char *propertyName) const
 
const void * getPluginPropertyDefinition (InstanceId pluginID, const char *propertyName) const
 
const void * getPluginPropertyDefinitionFromClass (const char *pluginClassName, const char *propertyName) const
 
double getPluginPropertyDouble (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
int getPluginPropertyElementsCount (InstanceId pluginID, const char *propertyName) const
 
float getPluginPropertyFloat (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
float getPluginPropertyFloat (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
int getPluginPropertyInt (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
int getPluginPropertyInt (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
Matrix getPluginPropertyMatrix (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
Matrix getPluginPropertyMatrix (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
std::vector< std::string > getPluginPropertyNames (const char *pluginClassName) const
 
PluginRef getPluginPropertyPluginRef (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
Type getPluginPropertyRuntimeType (const char *pluginName, const char *propertyName) const
 
Type getPluginPropertyRuntimeType (InstanceId pluginID, const char *propertyName) const
 
Transform getPluginPropertyTransform (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
Transform getPluginPropertyTransform (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
template<typename T >
getPluginPropertyTyped (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
Value getPluginPropertyValue (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
std::string getPluginPropertyValueAsString (const char *pluginName, const char *propertyName, double time) const
 
std::string getPluginPropertyValueAsString (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
bool getPluginPropertyValueAtTimeSDKInterop (InstanceId pluginID, const char *propertyName, void *pval, int type, double time) const
 
bool getPluginPropertyValueSDKInterop (InstanceId pluginID, const char *propertyName, void *pval, int type) const
 
Vector getPluginPropertyVector (const char *pluginName, const char *propertyName, bool &ok, double time) const
 
Vector getPluginPropertyVector (InstanceId pluginID, const char *propertyName, bool &ok, double time) const
 
const char * getPluginType (const char *name) const
 
const char * getPluginType (InstanceId pluginID) const
 
PluginTypeId getPluginTypeId_internal (const char *pluginType) const
 
PluginTypeId getPluginTypeId_internal (InstanceId pluginID) const
 
const char * getPluginTypeString (PluginTypeId pluginTypeId) const
 
int getPropertyIndexFromName (InstanceId pluginID, const char *propertyName) const
 
const char * getPropertyNameFromIndex (InstanceId pluginID, int idx) const
 
VRayImagegetRenderElementAsImage (InstanceId pluginID, int type, int layer, const ImageRegion *rgn, int corrected) const
 
size_t getRenderElementData (InstanceId pluginID, InstanceId alphaPluginID, int type, int layer, RenderElement::PixelFormat format, bool rgbOrder, const ImageRegion *rgn, void **buf) const
 
size_t getRenderElementDataIntoBuffer (InstanceId pluginID, InstanceId alphaPluginID, int type, int layer, RenderElement::PixelFormat format, bool rgbOrder, const ImageRegion *rgn, bool flipImage, void *buf) const
 
bool getRenderElementInfo (InstanceId pluginID, int type, RenderElement::Info &chInfo) const
 
std::string getRenderElementMetadata (InstanceId pluginID, int type) const
 
Plugin getRenderElementPlugin (int type) const
 
std::vector< PlugingetRenderElementPluginsList (int type) const
 
bool isPropertyAnimated (InstanceId pluginID, const char *propertyName) const
 
Plugin newRenderElementPlugin (int type, const char *instanceName, const char *displayName)
 
bool pluginExists_internal (InstanceId pluginID) const
 
bool setPluginName (InstanceId pluginID, const char *name) const
 
bool setPluginPropertyValueAsString (InstanceId pluginID, const char *propertyName, const char *value) const
 
bool setPluginPropertyValueAsStringAtTime (InstanceId pluginID, const char *propertyName, const char *value, double time) const
 
bool setPluginPropertyValueAtTime (InstanceId pluginID, const char *propertyName, const void *pval, double time) const
 
bool setPluginPropertyValueAtTimeSDKInterop (InstanceId pluginID, const char *propertyName, const void *pval, int type, double time) const
 
bool setPluginPropertyValueRawAtTime (InstanceId pluginID, const char *propertyName, const void *pval, size_t count, double time) const
 
bool setPluginPropertyValueSDKInterop (InstanceId pluginID, const char *propertyName, const void *pval, int type) const
 

Static Protected Member Functions

static std::vector< const char * > getCharPtrVector (const std::vector< std::string > &strVector)
 
template<class T >
static std::vector< T > getPluginsOfType (VRayRenderer &renderer, const char *pluginType)
 
template<class T >
static std::vector< T > getPluginsOfTypeId (VRayRenderer &renderer, PluginTypeId typeId)
 
static std::vector< std::string > getStringVector (void *pvector)
 
static VRayRenderergetVRayRenderer (void *rendererNative)
 

Friends

class Internal::Access
 
class LocalBmp
 
class LocalJpeg
 
class LocalPng
 
class Plugin
 
class PluginMeta
 
template<class P >
class PluginRefT
 
class PropertyMeta
 
class PropertyRuntimeMeta
 
class RenderElement
 
class RenderElements
 
class UIGuides
 
template<class T , Util::PreCreateCallbackOptions(T::*)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *) TMethod, void(T::*)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *) TMethod1>
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const char *pluginType, T &obj, const void *userData)
 
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const char *pluginType, Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *), void(*postCreateCallback)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *), const void *userData)
 
template<class T , Util::PreCreateCallbackOptions(T::*)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *) TMethod, void(T::*)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *) TMethod1>
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const PluginTypeId &pluginTypeId, T &obj, const void *userData)
 
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const PluginTypeId &pluginTypeId, Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *), void(*postCreateCallback)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *), const void *userData)
 
template<class T , Util::PreCreateCallbackOptions(T::*)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *) TMethod, void(T::*)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *) TMethod1>
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const std::string &pluginType, T &obj, const void *userData)
 
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const std::string &pluginType, Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *), void(*postCreateCallback)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *), const void *userData)
 
template<class T , Util::PreCreateCallbackOptions(T::*)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *) TMethod, void(T::*)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *) TMethod1>
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const std::vector< Plugin > &includeListOfPlugins, const std::vector< Plugin > &excludeListOfPlugins, T &obj, const void *userData)
 
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, const std::vector< Plugin > &includeListOfPlugins, const std::vector< Plugin > &excludeListOfPlugins, Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *), void(*postCreateCallback)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *), const void *userData)
 
template<class T , Util::PreCreateCallbackOptions(T::*)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *) TMethod, void(T::*)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *) TMethod1, class PluginType >
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, T &obj, const void *userData)
 
template<class PluginType >
int Util::copyPlugins (VRayRenderer &srcRenderer, VRayRenderer &dstRenderer, Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer &dstRenderer, Plugin &srcPlugin, void *), void(*postCreateCallback)(Plugin &dstPlugin, const char *srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const char *preCreateCallbackReturnedName, void *), const void *userData)
 

Detailed Description

This class wraps the underlying V-Ray render engine and its scene contents.

  • Rendering is always started in a separate thread. In Interactive mode changes to the scene are disabled for the period between calling start and receiving the 'started' event. After that changes can be made. They get applied asynchronously to the V-Ray engine in its own threads.
  • VRayRenderer callbacks are emitted from their own separate dedicated thread where events are queued and dispatched.This means that they may be seen later than the precise time they occurred and in some cases the state of the renderer could have changed meanwhile. The callbacks that you attach should be fast because their execution blocks any other queued event callbacks.

Member Enumeration Documentation

◆ DebugShadingMode

enum class VRay::VRayRenderer::DebugShadingMode : int
strong

Enum with the different debug shading modes.

Enumerator
isolateSelect 

Render only selected nodes/the nodes with the selected textures/materials.

globalLighting 

Render everything with a gray Lambert material.

globalAO 

Render everything with a TexDirt material.

globalWireframe 

Render everything with a TexEdges material.

globalNormal 

Render everything with a TexSampler normal material.

globalUV 

Render everything with a TexSampler uvCoord material.

globalBarycentric 

Render everything with a TexSampler barycentryc_coords material.

◆ WaitTime

enum class VRay::VRayRenderer::WaitTime : int
strong

Used with waitForRenderEnd()

Enumerator
AwaitingOrIdle 

When used with keepInteractiveRunning will return on RENDERING_AWAITING_CHANGES or any idle state

Idle 

Will return on any idle state. When used with keepInteractiveRunning, this means only stop or error.

Constructor & Destructor Documentation

◆ VRayRenderer() [1/3]

VRay::VRayRenderer::VRayRenderer ( )

Default constructor which uses default rendering options The default render mode is Interactive.

◆ VRayRenderer() [2/3]

VRay::VRayRenderer::VRayRenderer ( const RendererOptions rendererOptions)

Constructor which uses supplied immutable rendering options. The default render mode is Interactive.

◆ VRayRenderer() [3/3]

VRay::VRayRenderer::VRayRenderer ( InstanceHandleType  handle)
explicit

Creates a new shared VRayRenderer from an instance handle. This allows sharing a VRayRenderer instance among different programming languages and/or shared libraries in the same process. Use with extreme caution! Do not use unless you know exactly what you're doing!

Member Function Documentation

◆ addHosts()

AddHostsResult VRay::VRayRenderer::addHosts ( const char *  hosts) const

Adds hosts to the list for distributed rendering. If rendering is already in process, they are connected directly.

Parameters
hostsIP:port (or hostname:port) pairs as string delimited by ',' or ';'
Returns
See the AddHostsResult enum comments

◆ addVRayProfilerMetadata()

bool VRay::VRayRenderer::addVRayProfilerMetadata ( const char *  category,
const char *  key,
const char *  value 
)

Add a key-value pair to VRay Profiler metadata under a specific category (key). Should be called as early as possible before setVRayProfiler, otherwise it will have no effect.

Parameters
category- a key to which the key-value pair will be added
key- a preferably unique identifier. If duplicated the last value entry will be set to correspond to this key
value- the value to the corresponding key
Returns
true if the key-value pair has been successfully added and false if there was a problem

◆ append() [1/2]

int VRay::VRayRenderer::append ( const char *  fileName,
bool  drSendNameOnly = false 
)

Appends the specified scene file data to the currently loaded scene without wiping it.

Parameters
fileNameThe file path to the .vrscene file which will be appended.
drSendNameOnlyIndicates whether the whole file should be sent to the DR hosts or the name only.
Returns
0 - no error; check getLastParserError() if != 0

◆ append() [2/2]

int VRay::VRayRenderer::append ( const std::vector< const char * > &  fileNames)

Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one.

Parameters
fileNamesThe file paths vector to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsText() [1/3]

int VRay::VRayRenderer::appendAsText ( const char *  text)

Similar to append() but this takes as input directly the text contents of a scene file

Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsText() [2/3]

template<typename T = void>
int VRay::VRayRenderer::appendAsText ( const char *  text,
size_t  length,
void(*)(char *text, size_t size, T *holderObject)  freeFn = NULL,
T *  holderObject = NULL 
)

Similar to append() but this takes as input the text contents of a scene file The text is used directly and is NOT copied into V-Ray internal memory.

Parameters
textThe text contents of a vrscene.
lengthThe length in bytes of the text contents (without a terminating zero character).
freeFnA pointer to a custom free function to be called when the data is no longer needed. If omitted, the data won't be freed.
holderObjectA pointer to a custom object that manages the text memory.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsText() [3/3]

int VRay::VRayRenderer::appendAsText ( const std::vector< const char * > &  sceneTexts)

Appends the specified scene texts to the currently loaded scene without wiping it. This treats all texts as one.

Parameters
sceneTextsThe vector with scene texts which will be appended. The texts are interpreted as one. If one fails, they all fail.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsTextFiltered() [1/4]

int VRay::VRayRenderer::appendAsTextFiltered ( const char *  fileName,
bool(*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *)  callback,
const void *  userData = NULL 
)

Similar to appendFiltered() but this takes as input directly the text contents of a scene file.

Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsTextFiltered() [2/4]

template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int VRay::VRayRenderer::appendAsTextFiltered ( const char *  fileName,
T &  obj,
const void *  userData = NULL 
)

Similar to appendFiltered() but this takes as input directly the text contents of a scene file.

Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsTextFiltered() [3/4]

int VRay::VRayRenderer::appendAsTextFiltered ( const std::vector< const char * > &  sceneTexts,
bool(*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *)  callback,
const void *  userData = NULL 
)

Appends the specified scene texts to the currently loaded scene without wiping it. This treats all texts as one. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
sceneTextsThe vector with scene texts which will be appended. The texts are interpreted as one. If one fails, they all fail.
callbackThe callback function called for each plugin. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendAsTextFiltered() [4/4]

template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int VRay::VRayRenderer::appendAsTextFiltered ( const std::vector< const char * > &  sceneTexts,
T &  obj,
const void *  userData = NULL 
)

Appends the specified scene texts to the currently loaded scene without wiping it. This treats all texts as one. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
TThe type of the object containing a callback member function.
TMethodA pointer to the callback member function. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
sceneTextsThe vector with scene texts which will be appended. The texts are interpreted as one. If one fails, they all fail.
objThe object containing the callback member function called for each plugin.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendFiltered() [1/4]

int VRay::VRayRenderer::appendFiltered ( const char *  fileName,
bool(*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *)  callback,
const void *  userData = NULL 
)

Appends the specified scene file data to the currently loaded scene without wiping it. The file can be exported from a previous session with this SDK or from V-Ray for 3dsMax, Maya, etc. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
fileNameThe file path to the .vrscene file which will be appended.
callbackThe callback function called for each plugin. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendFiltered() [2/4]

template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int VRay::VRayRenderer::appendFiltered ( const char *  fileName,
T &  obj,
const void *  userData = NULL 
)

Appends the specified scene file data to the currently loaded scene without wiping it. The file can be exported from a previous session with this SDK or from V-Ray for 3dsMax, Maya, etc. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
TThe type of the object containing a callback member function.
TMethodA pointer to the callback member function. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
fileNameThe file path to the .vrscene file which will be appended.
objThe object containing the callback member function called for each plugin.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendFiltered() [3/4]

int VRay::VRayRenderer::appendFiltered ( const std::vector< const char * > &  fileNames,
bool(*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *)  callback,
const void *  userData = NULL 
)

Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
fileNamesThe file paths vector to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail.
callbackThe callback function called for each plugin. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ appendFiltered() [4/4]

template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int VRay::VRayRenderer::appendFiltered ( const std::vector< const char * > &  fileNames,
T &  obj,
const void *  userData = NULL 
)

Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
TThe type of the object containing a callback member function.
TMethodA pointer to the callback member function. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
fileNamesThe file paths vector to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail.
objThe object containing the callback member function called for each plugin.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ bucketRenderNearest()

void VRay::VRayRenderer::bucketRenderNearest ( int  x,
int  y 
) const

When using the bucket sampler in production mode this sets a "focus point" for the follow mouse cursor feature of the VFB. This API allows you to do this without the VFB. Buckets are generated in a circle outward from the point.

Parameters
xThe x-coordinate of the focus point. If set to negative this will reset the "follow cursor" behavior and continue with the normal bucket generator.
yThe y-coordinate of the focus point. If set to negative this will reset the "follow cursor" behavior and continue with the normal bucket generator.

◆ commit()

unsigned long long VRay::VRayRenderer::commit ( )

Commits any accumulated scene changes. This is necessary if the autoCommit flag is set to false.

Returns
The new change index if the changes were successfully committed, 0 otherwise. See setOnProgressiveImageUpdated().

◆ deletePlugin() [1/3]

bool VRay::VRayRenderer::deletePlugin ( const char *  pluginName)

Remove the plugin from the scene. Plugin object handles becomes invalid if the call is successful.

Returns
true if removal was successful

◆ deletePlugin() [2/3]

bool VRay::VRayRenderer::deletePlugin ( const Plugin plugin)

Remove the plugin from the scene. The Plugin object becomes invalid if the call is successful.

Returns
true if removal was successful

◆ deletePlugin() [3/3]

bool VRay::VRayRenderer::deletePlugin ( const std::string &  pluginName)

Remove the plugin from the scene. Plugin object handles becomes invalid if the call is successful.

Returns
true if removal was successful

◆ deletePlugins() [1/3]

bool VRay::VRayRenderer::deletePlugins ( const char *  names[],
size_t  namesCount 
)

Remove the plugins from the scene. If removal of any plugin fails, it continues to the next. Plugin object handles become invalid if successful.

Returns
true if all plugin removals were successful, false if any of them failed

◆ deletePlugins() [2/3]

bool VRay::VRayRenderer::deletePlugins ( const std::vector< std::string > &  names)

Remove the plugins from the scene. If removal of any plugin fails, it continues to the next. Plugin object handles become invalid if successful.

Returns
true if all plugin removals were successful, false if any of them failed

◆ deletePlugins() [3/3]

bool VRay::VRayRenderer::deletePlugins ( const std::vector< VRay::Plugin > &  plugins)

Remove the plugins from the scene. If removal of any plugin fails, it continues to the next. Plugin object handles become invalid if successful.

Returns
true if all plugin removals were successful, false if any of them failed

◆ denoiseNow()

bool VRay::VRayRenderer::denoiseNow ( void(*)(VRayRenderer &, VRayImage *, void *)  userCb = 0,
bool  shouldPassImage = true,
const void *  userData = NULL 
)

Explicitly starts the denoiser. Requires a RenderChannelDenoiser instance in the scene. This can be run while rendering is ongoing or when it's paused or after it is stopped. Denoising parameters are taken from the RenderChannelDenoiser plugin. The denoising is run asynchronously, so this function will return as soon as the thread is started. When denoising is done the postEffectsUpdated callback will be called. Additionally, if specified, a user callback will be called (with an option to also pass an image to it).

Parameters
userCb[optional] A callback function to be called when denoising is finished.
shouldPassImage[optional] Whether to pass an image to the callback function.
Returns
true if the denoising thread is started successfully and false if there is a problem with the parameters or renderer state

◆ disableDRClient()

bool VRay::VRayRenderer::disableDRClient ( )

NOTE: Available in DR2 only Toggles off the current VRayRenderer to act as a DR2 client.

Returns
False if this failed, e.g. when a render is already running.

◆ enableDRClient()

bool VRay::VRayRenderer::enableDRClient ( const EnableDRClientParams enableParams)

NOTE: Available in DR2 only Toggles on the current VRayRenderer to act as a DR2 client.

Parameters
enableParamsThe necessary parameters.
Returns
False if this failed, e.g. when a render is already running or V-Ray failed to initialize its DR subsystem.

◆ enableLiveLinkClient()

bool VRay::VRayRenderer::enableLiveLinkClient ( const LiveLinkClientParameters params)

NOTE: Available in DR2 only Toggles on the current VRayRenderer to act as a DR2 LiveLink client

Parameters
paramsPre-configured parameters to enable livelink
Returns
False if this failed, e.g. when a render is already running or V-Ray failed to initialize its DR subsystem.

◆ exportScene() [1/2]

int VRay::VRayRenderer::exportScene ( const char *  filePath) const

Exports the current scene contents to the specified file. The exporter serializes all plugins in text format.

Parameters
filePathThe path to the file where the scene will be exported. The file path must contain the name and extension of the destination file.
Returns
0 - no error

◆ exportScene() [2/2]

int VRay::VRayRenderer::exportScene ( const char *  filePath,
const VRayExportSettings settings 
) const

Exports the current scene contents to the specified file. The exporter serializes all plugins in text format.

Parameters
filePathThe path to the file where the scene will be exported. The file path must contain the name and extension of the destination file.
settingsAdditional options such as plugin list, compression and file splitting
Returns
0 - no error

◆ exportSceneToBuffer() [1/2]

std::string VRay::VRayRenderer::exportSceneToBuffer ( ) const

Exports the current scene contents and return the generated vrscene stream as a string. The exporter serializes all plugins in text format.

Returns
the vrscene stream as a string

◆ exportSceneToBuffer() [2/2]

std::string VRay::VRayRenderer::exportSceneToBuffer ( const VRayExportSettings settings) const

Exports the current scene contents and return the generated vrscene stream as a string. The exporter serializes all plugins in text format.

Parameters
settingsOptions such as plugin list, compression and file splitting
Returns
the vrscene stream as a string

◆ getActiveHosts()

std::string VRay::VRayRenderer::getActiveHosts ( ) const

Returns all active hosts during distributed rendering.

Returns
semicolon separated string of IP:port (or hostname:port) pairs

◆ getAllHosts()

std::string VRay::VRayRenderer::getAllHosts ( ) const

Returns all hosts set for distributed rendering.

Returns
semicolon separated string of IP:port (or hostname:port) pairs

◆ getCausticsSize()

size_t VRay::VRayRenderer::getCausticsSize ( ) const
Returns
The size in bytes of the caustics photon map in memory. This is 0 if no data is available.

◆ getChangeIndex()

unsigned long long VRay::VRayRenderer::getChangeIndex ( ) const

Returns the last change index for interactive changes on the renderer instance.

Returns
The last applied change index. Should be equal to result from the last commit() call, if there are no pending changes.

◆ getComputeDevicesCUDA()

std::vector< ComputeDeviceInfo > VRay::VRayRenderer::getComputeDevicesCUDA ( ) const

Returns a list of all devices available for use by the CUDA engine. The "CUDA CPU" device uses the CUDA engine code compiled for the x86-64 architecture. It is not the CPU V-Ray engine. It is disabled by default but you can enable it for faster "hybrid" rendering.

Returns
If the list is empty, check getLastError() for failure.
See also
struct ComputeDeviceInfo

◆ getComputeDevicesCurrentEngine()

std::vector< ComputeDeviceInfo > VRay::VRayRenderer::getComputeDevicesCurrentEngine ( ) const

Returns a list of all devices available for use by the current engine (Optix, CUDA, Metal).

Returns
If the list is empty, check getLastError() for failure. The list will be empty without error if the current render mode is CPU.
See also
struct ComputeDeviceInfo

◆ getComputeDevicesDenoiser()

std::vector< ComputeDeviceInfo > VRay::VRayRenderer::getComputeDevicesDenoiser ( ) const

Returns a list of all devices available for denoising.

Returns
If the list is empty, check getLastError() for failure.
See also
struct ComputeDeviceInfo

◆ getComputeDevicesMetal()

std::vector< ComputeDeviceInfo > VRay::VRayRenderer::getComputeDevicesMetal ( ) const

Returns a list of all devices available for use by the Metal engine. macOS only.

Returns
If the list is empty, check getLastError() for failure.
See also
struct ComputeDeviceInfo

◆ getComputeDevicesOptix()

std::vector< ComputeDeviceInfo > VRay::VRayRenderer::getComputeDevicesOptix ( ) const

Returns a list of all devices available for use by the Optix engine.

Returns
If the list is empty, check getLastError() for failure.
See also
struct ComputeDeviceInfo

◆ getCurrentFrame()

int VRay::VRayRenderer::getCurrentFrame ( ) const

Get the currently set animation frame number. This is related to the current scene time through the SettingsOutput.frames_per_second parameter. If called during render sequence will return the frame number that will be rendered after the call to continueSequence().

◆ getCurrentTime()

double VRay::VRayRenderer::getCurrentTime ( ) const

Gets the current scene time. This is related to the current frame number through the SettingsOutput.frames_per_second parameter. If called during render sequence will return the time of the frame that will be rendered after the call to continueSequence().

◆ getDREnabled()

bool VRay::VRayRenderer::getDREnabled ( ) const

NOTE: Available in DR1 only Return whether distributed rendering is currently enabled or not.

◆ getIESPrescribedIntensity()

float VRay::VRayRenderer::getIESPrescribedIntensity ( const char *  iesLightFileName) const

Returns the prescribed intensity from an ies file

Parameters
iesLightFileNamestring Path to the ies file

◆ getImage() [1/2]

VRayImage * VRay::VRayRenderer::getImage ( ) const

Returns a pointer to a copy of the image contained in the renderer image buffer at this moment. The caller is responsible for deleting it. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

◆ getImage() [2/2]

VRayImage * VRay::VRayRenderer::getImage ( const GetImageOptions options) const

Returns a pointer to a copy of the image contained in the renderer image buffer at this moment. The caller is responsible for deleting it. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
optionsUse to modify behavior compared to getImage(void) - crop, color correct, etc.

◆ getImageIntoBuffer()

size_t VRay::VRayRenderer::getImageIntoBuffer ( const GetImageOptions options,
void *  buf 
) const

Retrieves the render image raw data into the buffer. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
optionsImage options (crop, color correct, etc.).
bufThe output data buffer. If nullptr - returns required buffer size.
Returns
If data is nullptr returns required buffer size; 0 on error; 1 on success.

◆ getInactiveHosts()

std::string VRay::VRayRenderer::getInactiveHosts ( ) const

Returns all inactive hosts during distributed rendering.

Returns
semicolon separated string of IP:port (or hostname:port) pairs

◆ getInProcess()

bool VRay::VRayRenderer::getInProcess ( ) const

NOTE: Available in DR1 only Return the current value of the inProcess flag.

◆ getInstanceHandle()

InstanceHandleType VRay::VRayRenderer::getInstanceHandle ( ) const

Returns a handle which allows sharing a VRayRenderer instance among different programming languages and/or shared libraries in the same process. Use with extreme caution! Do not use unless you know exactly what you're doing!

◆ getInstanceOf() [1/2]

Plugin VRay::VRayRenderer::getInstanceOf ( const char *  pluginType) const

Returns the latest instance of a given plugin type if any exist. Should be used for singleton plugins. Settings plugins are singletons.

Parameters
pluginTypeThe plugin class name.
Returns
The plugin instance which may be invalid if one does not exist.

◆ getInstanceOf() [2/2]

Plugin VRay::VRayRenderer::getInstanceOf ( PluginTypeId  pluginTypeId) const

Returns the latest instance of a given plugin type if any exist. Should be used for singleton plugins. Settings plugins are singletons.

Parameters
pluginTypeIdThe plugin type id.
Returns
The plugin instance which may be invalid if one does not exist.

◆ getInstanceOrCreate() [1/3]

Plugin VRay::VRayRenderer::getInstanceOrCreate ( const char *  pluginName,
const char *  pluginType 
)

Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise, using the given instance name. Should be used for singleton plugins. Settings plugins are singletons. Use getOrCreatePlugin() for other plugin types.

Parameters
pluginNameThe plugin instance name if it has to be created.
pluginTypeThe plugin class name.
Returns
The plugin instance which may be invalid if the requested type itself is invalid.

◆ getInstanceOrCreate() [2/3]

Plugin VRay::VRayRenderer::getInstanceOrCreate ( const char *  pluginType)

Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise. Should be used for singleton plugins. Settings plugins are singletons. Use getOrCreatePlugin() for other plugin types.

Parameters
pluginTypeThe plugin class name.
Returns
The plugin instance which may be invalid if the requested type itself is invalid.

◆ getInstanceOrCreate() [3/3]

Plugin VRay::VRayRenderer::getInstanceOrCreate ( PluginTypeId  pluginTypeId)

Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise. Should be used for singleton plugins. Settings plugins are singletons. Use getOrCreatePlugin() for other plugin types.

Parameters
pluginTypeIdThe plugin type id.
Returns
The plugin instance which may be invalid if the requested type itself is invalid.

◆ getIrradianceMapSize()

size_t VRay::VRayRenderer::getIrradianceMapSize ( ) const
Returns
The size in bytes of the irradiance map in memory. This is 0 if no IM is available.

◆ getLightCacheSize()

size_t VRay::VRayRenderer::getLightCacheSize ( ) const
Returns
The size in bytes of the light cache in memory. This is 0 if no LC is available.

◆ getOrCreatePlugin()

Plugin VRay::VRayRenderer::getOrCreatePlugin ( const char *  pluginName,
const char *  pluginType 
)

Returns an existing plugin instance with the given instance name and of the given type. A new instance is created if one does not exist with the given name. This behaves like getInstanceOrCreate if no instance name is given (empty/null), i.e. returns any instance of this type as long as one exists. For singleton plugins like the settings plugins use getInstanceOrCreate() to avoid inadvertently creating more than one instance.

Parameters
pluginNameThe plugin instance name. If empty, any existing plugin might be returned.
pluginTypeThe plugin class name.
Returns
The plugin instance which should not be invalid unless the plugin type is not available.

◆ getPhotonMapSize()

size_t VRay::VRayRenderer::getPhotonMapSize ( ) const
Returns
The size in bytes of the global photon map in memory. This is 0 if no PM is available.

◆ getPlugin()

Plugin VRay::VRayRenderer::getPlugin ( const char *  pluginName) const

Search for a plugin instance with the given name.

Returns
Invalid Plugin object if not found.

◆ getPlugins()

template<class T , class RetT = T>
std::vector< RetT > VRay::VRayRenderer::getPlugins ( ) const

Returns all plugin instances of a given type T in the current scene. If you want to get an std::vector<Plugin> instead of std::vector<T> pass Plugin as a second template parameter e.g. getPlugins<Node, Plugin>()

◆ getPluginsOfCategories()

std::vector< Plugin > VRay::VRayRenderer::getPluginsOfCategories ( const std::vector< PluginCategories > &  categories) const

Returns all plugin instances that belong to all passed categories in categories[0] or all in categories[1], etc.

◆ getPluginTypesOfCategory()

std::vector< std::string > VRay::VRayRenderer::getPluginTypesOfCategory ( PluginCategory  category) const

Returns the class names of all available V-Ray plugin classes loaded from dynamic libraries which belong to the specified category.

Parameters
categoryPlugin category
Returns
vector of class names

◆ getRenderRegion()

bool VRay::VRayRenderer::getRenderRegion ( int &  rgnLeft,
int &  rgnTop,
int &  rgnWidth,
int &  rgnHeight 
) const

Gets the rendering region within the image width and height. (width and height are the rendering sizes set by other methods or constructors, etc.)

◆ getRenderSizes()

bool VRay::VRayRenderer::getRenderSizes ( RenderSizeParams sizes,
bool &  regionButtonState 
) const

Gets the frame buffer width and height, the rendering region and the crop region.

Parameters
sizesStructure of all applicable parameters and a bitmask which indicates which ones have been set.
regionButtonStatethe state of the VFB's region button.

◆ getState()

RendererState VRay::VRayRenderer::getState ( ) const

Returns the current state of the renderer. The state could change asynchronously as rendering occurs in another thread.

Note
Use the static helpers IsInactiveState and IsActiveState to check for multiple values.
See also
RendererState

◆ getVFBContextMenuItemValue()

bool VRay::VRayRenderer::getVFBContextMenuItemValue ( int  commandId,
int &  value 
) const

Get the value from a VFB context menu checkbox item.

Parameters
commandIdcommandId of the menu item
valueoutput parameter for the value
Returns
false if the menu item does not exist or is not a checkbox

◆ isAborted()

bool VRay::VRayRenderer::isAborted ( ) const

Returns if the rendering has been aborted.

Returns
true if the user has clicked on the Stop button in VFB, false otherwise.

◆ isDRClientEnabled()

bool VRay::VRayRenderer::isDRClientEnabled ( ) const

NOTE: Available in DR2 only Returns whether the current VRayRenderer acts as a DR2 client or not.

◆ isFrameSkipped()

bool VRay::VRayRenderer::isFrameSkipped ( ) const

Returns whether the frame has been skipped.

Returns
true if the frame has been skipped, false otherwise.

◆ isRenderEnded()

bool VRay::VRayRenderer::isRenderEnded ( ) const

Checks if rendering is complete. If it ended in failure or got cancelled, this will still return true. Notice that an intermediate image may be available from getImage even if this returns false (because rendering is ongoing).

Remarks
It is recommended to use waitForRenderEnd instead of polling this in a loop.

◆ isRenderingInHalfResolution()

bool VRay::VRayRenderer::isRenderingInHalfResolution ( ) const
inline

True if V-Ray is rendering internally half resolution (the images/data returned are upsampled to full resolution). False if V-Ray is rendering in full resolution.

◆ isSequenceEnded()

bool VRay::VRayRenderer::isSequenceEnded ( ) const

Gets the status of the sequence rendering process. This is not meaningful if you're not rendering a sequence.

Returns
true if the whole sequence has been rendered, false otherwise.

◆ load()

int VRay::VRayRenderer::load ( const char *  fileName)

Loads the specified V-Ray scene file (.vrscene) into memory. Previous scene contents are wiped. The file can be exported from a previous session with this SDK or from V-Ray for 3dsMax, Maya, etc.

Parameters
fileNameThe file path to the .vrscene file which will be loaded.
Returns
0 - no error; check getLastParserError() if != 0

◆ loadAsText() [1/2]

int VRay::VRayRenderer::loadAsText ( const char *  text)

Similar to load() but this takes as input the text contents of a scene file The text is copied into V-Ray internal memory. Consider using another overload if the text string is long.

Parameters
textThe text contents of a vrscene.
Returns
0 - no error; check getLastParserError() if != 0

◆ loadAsText() [2/2]

template<typename T = void>
int VRay::VRayRenderer::loadAsText ( const char *  text,
size_t  length,
void(*)(char *text, size_t size, T *holderObject)  freeFn = NULL,
T *  holderObject = NULL 
)

Similar to load() but this takes as input the text contents of a scene file The text is used directly and is NOT copied into V-Ray internal memory.

Parameters
textThe text contents of a vrscene.
lengthThe length in bytes of the text contents (without a terminating zero character).
freeFnA pointer to a custom free function to be called when the data is no longer needed. If omitted, the data won't be freed.
holderObjectA pointer to a custom object that manages the text memory.
Returns
0 - no error; check getLastParserError() if != 0

◆ loadAsTextFiltered() [1/2]

int VRay::VRayRenderer::loadAsTextFiltered ( const char *  fileName,
bool(*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *)  callback,
const void *  userData = NULL 
)

Similar to loadFiltered() but this takes as input directly the text contents of a scene file.

Returns
0 - no error; check getLastParserError() if != 0

◆ loadAsTextFiltered() [2/2]

template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int VRay::VRayRenderer::loadAsTextFiltered ( const char *  fileName,
T &  obj,
const void *  userData = NULL 
)

Similar to loadFiltered() but this takes as input directly the text contents of a scene file.

Returns
0 - no error; check getLastParserError() if != 0

◆ loadFiltered() [1/2]

int VRay::VRayRenderer::loadFiltered ( const char *  fileName,
bool(*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *)  callback,
const void *  userData = NULL 
)

Loads the specified V-Ray scene file (.vrscene) into memory. Previous scene contents are wiped. The file can be exported from a previous session with this SDK or from V-Ray for 3dsMax, Maya, etc. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
fileNameThe file path to the .vrscene file which will be loaded.
callbackThe callback function called for each plugin. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ loadFiltered() [2/2]

template<class T , bool(T::*)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *) TMethod>
int VRay::VRayRenderer::loadFiltered ( const char *  fileName,
T &  obj,
const void *  userData = NULL 
)

Loads the specified V-Ray scene file (.vrscene) into memory. Previous scene contents are wiped. The file can be exported from a previous session with this SDK or from V-Ray for 3dsMax, Maya, etc. A callback function is called for each plugin before it is created in memory. The user can decide whether he wants the plugin to be created or not and whether he wants to change its name.

Parameters
TThe type of the object containing a callback member function.
TMethodA pointer to the callback member function. Return true if you want the plugin to be created or false otherwise. You can also change the plugin name in the callback.
fileNameThe file path to the .vrscene file which will be loaded.
objThe object containing the callback member function called for each plugin.
userDataA pointer to optional user data which is then passed to the callback function.
Returns
0 - no error; check getLastParserError() if != 0

◆ lockScene()

void VRay::VRayRenderer::lockScene ( )

Locks the scene for writing and reading This will block until rendering stops and will not resume until unlockScene is called This method is usefull when there are a batch of changes to be made while interactive rendering is running. Locking scene before all changes and then unlocking after finished updating, may increase performance significantly when there are many changes.

◆ newPlugin() [1/2]

Plugin VRay::VRayRenderer::newPlugin ( const char *  pluginName,
const char *  pluginType 
)

Creates an instance of a specific Plugin type with the given instance name.

Parameters
pluginNameThe plugin name.
pluginTypeThe plugin class name.
Returns
The new plugin instance (an invalid Plugin on error).

◆ newPlugin() [2/2]

Plugin VRay::VRayRenderer::newPlugin ( const char *  pluginType)

Creates an instance of a specific Plugin type with an autogenerated instance name.

Parameters
pluginTypeThe plugin class name.
Returns
The new plugin instance (an invalid Plugin on error).

◆ operator bool()

VRay::VRayRenderer::operator bool ( ) const

If exceptions are not enabled use this function to test whether you have a valid renderer.

Returns
true - renderer instance is valid, false - renderer instance is invalid

◆ operator!()

bool VRay::VRayRenderer::operator! ( ) const

If exceptions are not enabled you can use this function to test whether you have a valid renderer.

Returns
true - renderer instance is invalid, false - renderer instance is valid

◆ optimizeMaterialGraph()

bool VRay::VRayRenderer::optimizeMaterialGraph ( const Plugin topPlugin)

Optimizes the plugin graph with the provided top plugin by merging instances with the same parameters. Note that plugins outside the graph may be modified as well. The graph defined by the topPlugin should be acyclic.

Parameters
topPluginThe top plugin for which the optimization will be performed.
Returns
true on success, false on failure
Remarks
The optimized plugins are not removed from the scene by this call.

◆ pause()

bool VRay::VRayRenderer::pause ( ) const

Pauses interactive rendering. Only sampling is stopped, so that the CPU/GPU will be idle, but everything else is the same. Returns true if the pause operation was successful, false otherwise (the renderer is in invalid state and transition could not be applied).

◆ pickPlugin() [1/2]

Plugin VRay::VRayRenderer::pickPlugin ( int  x,
int  y 
) const

Returns the first scene Node intersected by tracing a camera ray from image space coordinates (x;y), if any

Parameters
xImage space X
yImage space Y

◆ pickPlugin() [2/2]

Plugin VRay::VRayRenderer::pickPlugin ( int  x,
int  y,
int  timeout 
) const

Returns the first scene Node intersected by tracing a camera ray from image space coordinates (x;y), if any

Parameters
xImage space X
yImage space Y
timeoutMaximum milliseconds to spend before returning a result

◆ pickPlugins()

std::vector< PickedPluginInfo > VRay::VRayRenderer::pickPlugins ( double  x,
double  y,
int  maxcount = 0,
int  timeout = -1 
) const

Returns a list of scene Node intersected by tracing a camera ray from image space coordinates (x;y) ordered by depth

Parameters
xImage space X
yImage space Y
maxcountMaximum number of nodes to include in the list
timeoutMaximum milliseconds to spend before returning a result

◆ removeHosts()

int VRay::VRayRenderer::removeHosts ( const char *  hosts) const

Disconnects and removes hosts from the distributed rendering host lists.

Parameters
hostsIP:port (or hostname:port) pairs as string delimited by ',' or ';'
Returns
0 - no error

◆ renderSequence()

void VRay::VRayRenderer::renderSequence ( SubSequenceDesc  descriptions[],
size_t  count 
) const

Begins rendering an animation sequence in a separate thread. A non-blocking call.

Parameters
descriptionsFrame ranges to render
countThe number of elements in descriptions

◆ replacePlugin()

bool VRay::VRayRenderer::replacePlugin ( const Plugin oldPlugin,
const Plugin newPlugin 
)

Replaces all references (in the scene) of oldPlugin with newPlugin.

Parameters
oldPluginThe plugin whose references are to be replaced.
newPluginThe plugin which will replace the old one. This can be an empty Plugin() in which case all references to oldPlugin will be removed.
Returns
true on success, false on failure
Remarks
The oldPlugin does not get removed from the scene by this call

◆ resetHosts()

int VRay::VRayRenderer::resetHosts ( const char *  hosts = NULL) const

Resets the hosts list for distributed rendering. If rendering is in process, hosts that are not on the new list are disconnected.

Parameters
hostsIP:port (or hostname:port) pairs as string delimited by ',' or ';'
Returns
0 - no error

◆ resume()

bool VRay::VRayRenderer::resume ( ) const

Resumes interactive rendering. Returns true if the resume operation was successful, false otherwise (the renderer is in invalid state and transition could not be applied).

◆ saveCausticsFile()

bool VRay::VRayRenderer::saveCausticsFile ( const std::string &  fileName)
Parameters
fileNameDestination caustics photon map file
Returns
false if an error ocurred or there is no data to save. Check getLastError() for additional info.

◆ saveIrradianceMapFile()

bool VRay::VRayRenderer::saveIrradianceMapFile ( const std::string &  fileName)
Parameters
fileNameDestination irradiance map file
Returns
false if an error ocurred or there is no data to save. Check getLastError() for additional info.

◆ saveLightCacheFile()

bool VRay::VRayRenderer::saveLightCacheFile ( const std::string &  fileName)
Parameters
fileNameDestination light cache file
Returns
false if an error ocurred or there is no data to save. Check getLastError() for additional info.

◆ savePhotonMapFile()

bool VRay::VRayRenderer::savePhotonMapFile ( const std::string &  fileName)
Parameters
fileNameDestination global photon map file
Returns
false if an error ocurred or there is no data to save. Check getLastError() for additional info.

◆ serializeScene()

bool VRay::VRayRenderer::serializeScene ( )

Serializes the whole scene (plugins with their property values) contained in the renderer into a single memory stream no matter if they originate from a loaded or appended vrscene file or are created by code. The whole stream will be always transferred when DR hosts are connected. No DR hosts should have been connected before serialization. (Currently only one type of serialization is supported but other types may be added in the future.) This method is here mainly for debug purposes but it can be helpful in some other cases as well. Do not use it unless you know exactly what you're doing.

◆ setAutoCommit()

void VRay::VRayRenderer::setAutoCommit ( bool  autoCommit)

Change the autoCommit state of the renderer. When true, every parameter change is applied immediately. Otherwise you have to call commit() yourself to apply changes. 'false' allows you to batch changes together for efficiency.

◆ setBitmapCache()

int VRay::VRayRenderer::setBitmapCache ( bool  onOff)

Cache bitmaps between renders. If enabled, bitmap textures will be stored in memory and won't be unloaded / loaded again on the next render. This may save a lot of time loading heavy textures before every render.

Parameters
onOffEnable / disable bitmap texture cache. Disabling cache will clear cached data.
Returns
True if cache interfaces were added; false - otherwise.

◆ setCamera()

bool VRay::VRayRenderer::setCamera ( const Plugin plugin)

This method is only used when doing out-of-process rendering (inProcess=false). It updates the camera plugin used on DR machines when adding/removing CameraPhysical or another specific camera.

◆ setComputeDevicesCUDA()

bool VRay::VRayRenderer::setComputeDevicesCUDA ( const std::vector< int > &  indices)

Set which devices to use for rendering with the CUDA engine.

Parameters
indicesThe indices of the devices to use as returned by getComputeDevicesCUDA
Returns
false if an error occurred. Check getLastError() for additional info.

◆ setComputeDevicesCurrentEngine()

bool VRay::VRayRenderer::setComputeDevicesCurrentEngine ( const std::vector< int > &  indices)

Set which devices to use for rendering with the current engine (Optix, CUDA, Metal).

Parameters
indicesThe indices of the devices to use as returned by getComputeDevicesCurrentEngine
Returns
false if an error occurred. Check getLastError() for additional info. This will fail without error if the current render mode is CPU.

◆ setComputeDevicesDenoiser()

bool VRay::VRayRenderer::setComputeDevicesDenoiser ( const std::vector< int > &  indices)

Set which devices to use for denoising, when GPU denoiser is selected.

Parameters
indicesThe indices of the devices to use as returned by getComputeDevicesDenoiser
Returns
false if an error occurred. Check getLastError() for additional info.

◆ setComputeDevicesEnvironmentVariable()

bool VRay::VRayRenderer::setComputeDevicesEnvironmentVariable ( )

Set the user environment to the currently selected devices for each engine. Note that this will affect other V-Ray products as well.

Returns
false if an error occurred. Check getLastError() for additional info.

◆ setComputeDevicesMetal()

bool VRay::VRayRenderer::setComputeDevicesMetal ( const std::vector< int > &  indices)

Set which devices to use for rendering with the Metal engine. macOS only.

Parameters
indicesThe indices of the devices to use as returned by getComputeDevicesMetal
Returns
false if an error occurred. Check getLastError() for additional info.

◆ setComputeDevicesOptix()

bool VRay::VRayRenderer::setComputeDevicesOptix ( const std::vector< int > &  indices)

Set which devices to use for rendering with the Optix engine.

Parameters
indicesThe indices of the devices to use as returned by getComputeDevicesOptix
Returns
false if an error occurred. Check getLastError() for additional info.

◆ setCropRegion() [1/2]

bool VRay::VRayRenderer::setCropRegion ( int  srcWidth,
int  srcHeight,
float  rgnLeft,
float  rgnTop 
)

Sets a virtual crop region (rgnLeft, rgnTop, width, height) within a virtual source image space with size srcWidth, srcHeight. width and height are the rendering sizes set by other methods or constructors, etc. Set to an invalid size, like (0, 0, 0, 0), to reset the region and render the whole image. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file.

◆ setCropRegion() [2/2]

bool VRay::VRayRenderer::setCropRegion ( int  srcWidth,
int  srcHeight,
float  rgnLeft,
float  rgnTop,
float  rgnWidth,
float  rgnHeight 
)

Sets a virtual crop region (rgnLeft, rgnTop, rgnWidth, rgnHeigt) within a virtual source image space with sizes srcWidth, srcHeight. The output image pixel width and height do not change. Set to an invalid size, like (0, 0, 0, 0, 0, 0), to reset the region and render the whole image. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file.

◆ setCurrentFrame()

bool VRay::VRayRenderer::setCurrentFrame ( int  frame)

Change the current animation frame number. Setting properties after this will add keyframe values for this frame if useAnimatedValues(true) was called. This is related to the current scene time through the SettingsOutput.frames_per_second parameter.

Returns
false if called during renderSequence. Then the current frame is not set.

◆ setCurrentTime()

bool VRay::VRayRenderer::setCurrentTime ( double  time)

Sets the current scene time. This is related to the current frame number through the SettingsOutput.frames_per_second parameter.

Returns
false if called during renderSequence. Then the current time is not set.

◆ setDebugShadingSelection()

void VRay::VRayRenderer::setDebugShadingSelection ( const std::vector< Plugin > &  selection)

Selection for Debug Shading Isolate Selected mode.

Parameters
selection- A list of plugins to be selected.

◆ setDREnabled()

bool VRay::VRayRenderer::setDREnabled ( bool  drEnabled,
bool  enableBroadcastListener = true 
)

NOTE: Available in DR1 only Toggles distributed rendering on or off. This can only be done when the renderer is idle. When this is disabled (default) it saves some memory. When it is enabled remote render machines added with addHosts() will be connected and contribute to the render.

Parameters
drEnabledTrue to enable the DR subsystem.
enableBroadcastListenerOnly when drEnabled=true: Whether a socket will be created to listen for remote machine broadcast messages over LAN.
Returns
False if this failed, e.g. when a render is already running or V-Ray failed to initialize its DR subsystem.

◆ setImageSize()

bool VRay::VRayRenderer::setImageSize ( int  width,
int  height,
bool  resetCropRegion = true,
bool  resetRenderRegion = true 
)

Sets the frame buffer width and height. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file.

◆ setImprovedDefaultSettings()

bool VRay::VRayRenderer::setImprovedDefaultSettings ( DefaultsPreset  preset = quality_medium)

Execute this on an empty scene to create some settings plugins and initialize some of their properties to values better than the defaults. The defaults remain as they are for compatibility reasons. This should be done before applying your own settings and before starting a render. To see what got changed, export the scene after that to a file and inspect it.

Parameters
presetAmount of sampling to perform - tradeoff between render time and noise

◆ setIncludePaths()

void VRay::VRayRenderer::setIncludePaths ( const char *  includePaths,
bool  overwrite = true 
)

Set search paths for scene include files.

Parameters
includePathsstring that looks like "assets;assets/meshes;assets/textures". These are relative paths where the parser looks in when including files.
overwriteindicates whether to overwrite the existing search paths with the given string or to add it to them.

◆ setInProcess()

bool VRay::VRayRenderer::setInProcess ( bool  inProcess)

NOTE: Available in DR1 only Specify whether the executing process participates in the rendering (when true, default) or whether the rendering is executed entirely by V-Ray DR render slaves (when false)

Parameters
inProcessshould the client process participate in the rendering tasks
Returns
false if renderer is not idle - the change is not applied

◆ setInteractiveNoiseThreshold()

bool VRay::VRayRenderer::setInteractiveNoiseThreshold ( float  threshold)

Set noise threshold for a frame when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file.

◆ setInteractiveSampleLevel()

bool VRay::VRayRenderer::setInteractiveSampleLevel ( int  samplesPerPixel)

Set the maximum camera samples per pixel when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file.

◆ setInteractiveTimeout()

bool VRay::VRayRenderer::setInteractiveTimeout ( int  timeoutMsec)

Set a timeout value (in milliseconds) for a frame when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file.

◆ setKeepInteractiveRunning()

void VRay::VRayRenderer::setKeepInteractiveRunning ( bool  keepRunning)

When set to true V-Ray won't quit interactive rendering even if timeout or noise threshold are reached. Defaults to false. If a noise/time limit is reached, the render engine will become idle, but it will not unload and it will restart sampling when a scene change is applied. The only way to end the render is to explicitly stop() it.

◆ setNumThreads()

bool VRay::VRayRenderer::setNumThreads ( int  numThreads)

Set the number of threads that will be used for rendering. 0 (the default) means all CPU logical threads. This can only be changed while the renderer is idle.

Parameters
numThreadsnumber of render threads V-Ray will use
Returns
false if renderer is not idle - the change is not applied

◆ setOnBucketFailed()

void VRay::VRayRenderer::setOnBucketFailed ( void(*)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when an image bucket fails to render. This usually happens when a DR host drops. Callback arguments: renderer - The renderer which produced the event x - left border coordinate in full frame space y - top border coordinate in full frame space width - bucket width height - bucket height host - Hostname of the machine that works on the bucket if DR is enabled pass - Which render pass generated the image instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnBucketInit()

void VRay::VRayRenderer::setOnBucketInit ( void(*)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when an image bucket has been assigned and started rendering. Callback arguments: renderer - The renderer which produced the event x - left border coordinate in full frame space y - top border coordinate in full frame space width - bucket width height - bucket height host - Hostname of the machine that works on the bucket if DR is enabled pass - Which render pass generated the image instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnBucketReady() [1/2]

void VRay::VRayRenderer::setOnBucketReady ( void(&)(VRayRenderer &, int x, int y, const char *host, VRayImage *img, ImagePassType pass, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when an image bucket is completed. Callback arguments: renderer - The renderer which produced the event x - left border coordinate in full frame space y - top border coordinate in full frame space host - Hostname of the machine that works on the bucket if DR is enabled img - A copy of the bucket image buffer. This is deleted internally after the callback (unless setKeepBucketsInCallback(true) was called) pass - Which render pass generated the image instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnBucketReady() [2/2]

void VRay::VRayRenderer::setOnBucketReady ( void(&)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when an image bucket is completed. Callback arguments: renderer - The renderer which produced the event x - left border coordinate in full frame space y - top border coordinate in full frame space width - bucket width height - bucket height host - Hostname of the machine that works on the bucket if DR is enabled pass - Which render pass generated the image instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnHostConnected()

void VRay::VRayRenderer::setOnHostConnected ( void(*)(VRayRenderer &, const char *hostName, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when a DR host is connected. Callback arguments: renderer - The renderer which produced the event hostname - IP address or hostname instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnHostDisconnected()

void VRay::VRayRenderer::setOnHostDisconnected ( void(*)(VRayRenderer &, const char *hostName, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when a DR host is disconnected. Callback arguments: renderer - The renderer which produced the event hostname - IP address or hostname instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnLicenseError()

void VRay::VRayRenderer::setOnLicenseError ( void(*)(VRayRenderer &, const char *msg, int errorCode, LicenseUserStatus userStatus, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when V-Ray encounters a licensing error (in its rendering thread). Callback arguments: renderer - The renderer which produced the event msg - The error message contents. errorCode - An exact integer error code which may be used to define more specialized error. userStatus - A user status detail value. Non-zero only if named licensing is used and it is used with automatic ULA token query. instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnLightMixTransferToScene()

void VRay::VRayRenderer::setOnLightMixTransferToScene ( int(*)(VRayRenderer &, const std::vector< LightMixChange > &changes, double instant, void *)  callback,
const void *  userData = NULL 
)

Set callback function for the light mix transfer to scene callback. Callback arguments: renderer - The renderer which produced the event changes - an array holding the light mix changes instant - Relative time of the event in seconds since V-Ray initialization return - The callback has to return 0 on success, or a non-zero value to cancel the operation.

◆ setOnLogMessage()

void VRay::VRayRenderer::setOnLogMessage ( void(*)(VRayRenderer &, const char *msg, MessageLevel level, double instant, void *userData)  callback,
MessageLevel  minLevel = MessageInfo,
const void *  userData = NULL 
)

Set callback function for the event when V-Ray logs a text message. Callback arguments: renderer - The renderer which produced the event msg - The log message text level - Type of message, e.g. info, warning, error instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnPostEffectsUpdated()

void VRay::VRayRenderer::setOnPostEffectsUpdated ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when a new post-processed (denoised, lens effects) image is available. Callback arguments: renderer - The renderer which produced the event instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnProgress()

void VRay::VRayRenderer::setOnProgress ( void(*)(VRayRenderer &, const char *msg, int elementNumber, int elementsCount, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when V-Ray updates its current computation task and the number of workunits done. This is usually used to implement progress bars. Callback arguments: renderer - The renderer which produced the event msg - The title of the ongoing task elementNumber - Number of work items processed so far elementsCount - Total number of work items for the task instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnProgressiveImageUpdated()

void VRay::VRayRenderer::setOnProgressiveImageUpdated ( void(*)(VRayRenderer &, VRayImage *img, unsigned long long changeIndex, ImagePassType pass, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when an updated image is available in progressive rendering mode. Callback arguments: renderer - The renderer which produced the event img - A copy of the image buffer. This is deleted internally after the callback (unless setKeepProgressiveFramesInCallback(true) was called) pass - Which render pass generated the image changeIndex - A linearly growing index reflecting the number of changes applied to the scene in interactive mode. Corresponds to value returned by commit(). instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnRendererClose()

void VRay::VRayRenderer::setOnRendererClose ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the VRayRenderer object is destroyed. Callback arguments: renderer - The renderer which produced the event instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnRenderViewChanged()

void VRay::VRayRenderer::setOnRenderViewChanged ( void(*)(VRayRenderer &, const char *propName, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the RenderView (camera) plugin has changed in interactive mode. Callback arguments: renderer - The renderer which produced the event propName - name of the RenderView parameter that was changed instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnStateChanged()

void VRay::VRayRenderer::setOnStateChanged ( void(*)(VRayRenderer &, RendererState oldState, RendererState newState, double instant, void *)  callback,
const void *  userData = NULL 
)

Set callback function for transitions between rendering states. See enum RendererState. Callback arguments: renderer - The renderer which produced the event oldState - The state before this event newState - The new state as of the time of the event ocurrence instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnUploadToCollaboration()

void VRay::VRayRenderer::setOnUploadToCollaboration ( int(*)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *)  callback,
const void *  userData = NULL 
)

Set callback function for the upload to collaboration callback. Callback arguments: renderer - The renderer which produced the event fileList - an array holding the paths to the files that should be uploaded instant - Relative time of the event in seconds since V-Ray initialization return - The callback has to return true if the files should be deleted, or false if they should be kept

◆ setOnVFBAddRenderElementToScene()

void VRay::VRayRenderer::setOnVFBAddRenderElementToScene ( bool(*)(VRayRenderer &, VFBRenderElementType type, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the "Add 'Render Element' to the scene" VFB button is pressed. The button does nothing by default. Callback arguments: renderer - The renderer which produced the event type - The type of the render element. Can be renderElementType_lightMix or renderElementType_denoiser. instant - Relative time of the event in seconds since V-Ray initialization return - The callback has to return true on success and false on an error

◆ setOnVFBClosed()

void VRay::VRayRenderer::setOnVFBClosed ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the VFB window is closed. Callback arguments: renderer - The renderer which produced the event instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBCopyToHostFrameBufferNotify()

void VRay::VRayRenderer::setOnVFBCopyToHostFrameBufferNotify ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the "Duplicate to host frame buffer" VFB button is pressed. Callback arguments: instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBDebugShadingNotify()

void VRay::VRayRenderer::setOnVFBDebugShadingNotify ( void(*)(VRayRenderer &, int enabled, DebugShadingMode mode, int selectionLocked, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when VFB IPR Debug Shading is enabled or its mode is changed. Callback arguments: enabled - Whether Debug Shading is enabled or disabled mode - The Debug Shading mode chosen selectionLocked - Whether selection is locked. Considered only when mode is isolateSelect instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBInteractiveStart()

void VRay::VRayRenderer::setOnVFBInteractiveStart ( void(*)(VRayRenderer &, bool isRendering, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the "Start IPR" VFB button is pressed. Callback arguments: renderer - The renderer which produced the event isRendering - false if the renderer was idle/stopped instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBLayersChanged()

void VRay::VRayRenderer::setOnVFBLayersChanged ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the VFB color corrections or compositing layers have changed. Note that this callback may be called multiple times in short time, when a parameter is changed by a slider. Callback arguments: renderer - The renderer which produced the event instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBOpenUpdateNotify()

void VRay::VRayRenderer::setOnVFBOpenUpdateNotify ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the user clicks the update available notification in VFB. Callback arguments: renderer - The renderer which produced the event instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBPauseIPR()

void VRay::VRayRenderer::setOnVFBPauseIPR ( void(*)(VRayRenderer &, bool isRendering, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the "Pause IPR" VFB button is pressed. The button pauses the rendering by default. Callback arguments: renderer - The renderer which produced the event isRendering - false if the renderer was idle/stopped instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBRenderLast()

void VRay::VRayRenderer::setOnVFBRenderLast ( void(*)(VRayRenderer &, bool isRendering, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the "render last" VFB button is pressed. Callback arguments: renderer - The renderer which produced the event isRendering - false if the renderer was idle/stopped instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBSaveSettingsNotify()

void VRay::VRayRenderer::setOnVFBSaveSettingsNotify ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when some settings have been changed from VFB UI. Callback arguments: instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBShowMessagesWindow()

void VRay::VRayRenderer::setOnVFBShowMessagesWindow ( void(*)(VRayRenderer &, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the message window button in the VFB is clicked. Callback arguments: renderer - The renderer which produced the event instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVFBUpdateIPR()

void VRay::VRayRenderer::setOnVFBUpdateIPR ( void(*)(VRayRenderer &, bool isRendering, double instant, void *userData)  callback,
const void *  userData = NULL 
)

Set callback function for the event when the "Update IPR" VFB button is pressed. The button restarts the rendering by default. Callback arguments: renderer - The renderer which produced the event isRendering - false if the renderer was idle/stopped instant - Relative time of the event in seconds since V-Ray initialization

◆ setOnVRayProfilerWrite()

void VRay::VRayRenderer::setOnVRayProfilerWrite ( void(*)(VRayRenderer &, const std::string &outputFile, int fileType, double instant, void *)  callback,
const void *  userData = nullptr 
)

Set callback function for the profiler output write to be called when the output is finished. Callback arguments: renderer - The renderer which produced the event outputFile - an array holding the paths to the files that should be uploaded fileType - The type of the file being saved, one of the values of the VRayProfilerSettings::FileType enum instant - Relative time of the event in seconds since V-Ray initialization

◆ setProgressiveImageUpdateDifference()

float VRay::VRayRenderer::setProgressiveImageUpdateDifference ( float  difference)

Sets the difference threshold for emitting a progressiveImageUpdated event. If V-Ray produces an image below the threshold, the event will not be emitted. The initial threshold value is 2.0.

◆ setProgressiveImageUpdateTimeout()

unsigned long VRay::VRayRenderer::setProgressiveImageUpdateTimeout ( unsigned long  timeout)

Set the maximum time before emitting a progressiveImageUpdated event. If the timeout is reached, an image will be emitted even if it's the same as the previous update.

Returns
The previous timeout value

◆ setRenderMode()

bool VRay::VRayRenderer::setRenderMode ( RenderMode  mode)

Changes the render mode if the renderer is in an idle state. If a rendering is in process, it will not be affected. You can switch between Production and Interactive mode with this without clearing the scene.

Returns
True if the render mode has been successfully changed; check getLastError() otherwise.

◆ setRenderRegion()

bool VRay::VRayRenderer::setRenderRegion ( int  rgnLeft,
int  rgnTop,
int  rgnWidth,
int  rgnHeight 
)

Sets the rendering region within the image width and height. (width and height are the rendering sizes set by other methods or constructors, etc.) Set to an invalid size, like (0, 0, 0, 0), to reset the region and render the whole image. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file.

◆ setRenderSizes()

bool VRay::VRayRenderer::setRenderSizes ( const RenderSizeParams sizes,
bool  regionButtonState 
)

Sets the frame buffer width and height, the rendering region and the crop region.

Parameters
sizesStructure of all applicable parameters and a bitmask which indicates which ones to be set.
regionButtonStatethe new state of the VFB's region button if applicable.

◆ setResumableRendering()

bool VRay::VRayRenderer::setResumableRendering ( bool  enable,
const ResumableRenderingOptions options 
)

Use this to enable resumable rendering before starting a render.

Parameters
enableWhether to enable or disable for this VRayRenderer
optionsoptional additional settings. Passing NULL is valid.
Returns
false if an error occurred. Check getLastError() for additional info.

◆ setUserCameraChangedCB()

void VRay::VRayRenderer::setUserCameraChangedCB ( void(*)(const UserCameraChanged *info, void *userData)  cb,
void *  userData 
)

NOTE: Available in DR2 only. Requires LiveLink to be enabled Installs (or replaces a previously installed) callback to listen for events related to changed camera properties in a connected downstream LiveLink partner. The callback shouldn't assume any particular thread

Parameters
cbthe callback to be installed
userDataany required user data, will be passed unmodified

◆ setUserLightChangedCB()

void VRay::VRayRenderer::setUserLightChangedCB ( void(*)(const UserLightChanged *info, void *userData)  cb,
void *  userData 
)

NOTE: Available in DR2 only. Requires LiveLink to be enabled Installs (or replaces a previously installed) callback to listen for events related to changed light properties in a connected downstream LiveLink partner. The callback shouldn't assume any particular thread

Parameters
cbthe callback to be installed
userDataany required user data, will be passed unmodified

◆ setUserNodeChangedCB()

void VRay::VRayRenderer::setUserNodeChangedCB ( void(*)(const UserNodeChanged *info, void *userData)  cb,
void *  userData 
)

NOTE: Available in DR2 only. Requires LiveLink to be enabled Installs (or replaces a previously installed) callback to listen for events related to hiding, showing and transforming (rotation and position) properties of a scene light, camera or geometry node in a connected downstream LiveLink partner. The callback shouldn't assume any particular thread

Parameters
cbthe callback to be installed
userDataany required user data, will be passed unmodified

◆ setVFBContextMenuItemValue()

bool VRay::VRayRenderer::setVFBContextMenuItemValue ( int  commandId,
int  value 
)

Set the value of a VFB context menu checkbox item.

Parameters
commandIdcommandId of the menu item
valuevalue to set. 0 means cleared and 1 means ticked.
Returns
false if the menu item does not exist or is not a checkbox

◆ setVFBContextMenuSelectedCallback()

void VRay::VRayRenderer::setVFBContextMenuSelectedCallback ( void(*)(VRayRenderer &, int commandId, int x, int y, void *userData)  callback,
const void *  userData = NULL 
)

Set the callback function to handle the custom context menu items commands. Callback arguments: renderer - The renderer which produced the event commandId - ID of the command x - the X component of the position, where the context menu is called y - the Y component of the position, where the context menu is called

◆ setVRayProfiler()

void VRay::VRayRenderer::setVRayProfiler ( const VRayProfilerSettings settings)

Sets up the VRay Profiler. Should be called as early as possible (e.g. before rendering start), otherwise it will have no effect. If you want to record other events diffrent from the default ones, you must start the profiler manually through profilerInitializeManually and use the ProfilerDurationScope class or profiler* methods in the API.

Parameters
settings- The settings, which contain the requested VRayProfiler operational mode, outputDirectory, max depth and other metadata

◆ start()

void VRay::VRayRenderer::start ( ) const

Begins the rendering process in a separate thread. A non-blocking call. Scene changes and DR host changes are forbidden until the StateChanged event transitions out of PREPARING state.

◆ startSync()

int VRay::VRayRenderer::startSync ( ) const

Begins the rendering process in a separate thread. Blocks until the preparation stage is complete and rendering has actually started.

Returns
0 - no error; check getLastError() if != 0

◆ tryLockScene()

bool VRay::VRayRenderer::tryLockScene ( )

Attempts to lock the scene, without blocking, for writing and reading If scene is locked, rendering stops and will not resume until unlockScene is called

See also
lockScene This is usefull when changes can be done only from the UI thread of the application. If locking fails then it can be attempted at a later time, allowing the UI thread to not block the UI.
Returns
true if the scene was locked, and false if not

◆ unlockScene()

void VRay::VRayRenderer::unlockScene ( )

Unlocks previously locked scene This must be called after the scene has been locked with lockScene or tryLockScene

◆ updateLightingAnalysis()

bool VRay::VRayRenderer::updateLightingAnalysis ( )

Invokes an update to the lighting analysis render element. Requires RenderChannelLightingAnalysis to be present in the scene. This can be run while rendering is ongoing or when it's paused or after it is stopped. Lighting analysis parameters are taken from the RenderChannelLightingAnalysis plugin. The update is asynchronous, so the funtion will return as soon as the thread is started. When the channel is updated the postEffectsUpdated callback will be called.

Returns
true if the thread is started successfully and false if there is a problem with the parameters or renderer state.

◆ useAnimatedValues()

void VRay::VRayRenderer::useAnimatedValues ( bool  on)

When enabled, setting parameter values will add keyframe values for animation. Otherwise the old value is just overwritten. The initial state is off.

◆ waitForRenderEnd() [1/2]

bool VRay::VRayRenderer::waitForRenderEnd ( const int  timeout) const

Waits for rendering to finish but no more than the specified timeout. If the keepInteractiveRunning flag is set, this event may occur without ending the render session.

Parameters
timeoutin milliseconds
Returns
true if image has been rendered, false if timeout or error occurred.

◆ waitForRenderEnd() [2/2]

bool VRay::VRayRenderer::waitForRenderEnd ( const WaitTime  time = WaitTime::AwaitingOrIdle) const

Waits for rendering to finish, regardless of the outcome (success, cancel, error). If the keepInteractiveRunning flag is set and WaitTime::AwaitingOrIdle is passed this event may occur without ending the render session (when the renderer state becomes RENDERING_AWAITING_CHANGES or any of the idle states).

Returns
true if image has been rendered, false if an error occurred.

◆ waitForSequenceEnd() [1/2]

bool VRay::VRayRenderer::waitForSequenceEnd ( ) const

Waits for rendering of the sequence to finish, regardless of the outcome (success, cancel, error).

Returns
true if rendering of the sequence has finished successfully, false if an error occurred.

◆ waitForSequenceEnd() [2/2]

bool VRay::VRayRenderer::waitForSequenceEnd ( const int  timeout) const

Waits for rendering of the sequence to finish but no more than the specified timeout.

Parameters
timeoutin milliseconds
Returns
true if rendering of the sequence has finished, false if timeout or error occurred.

◆ waitForVFBClosed() [1/2]

bool VRay::VRayRenderer::waitForVFBClosed ( ) const

Waits for the VFB window to be closed or hidden.

Returns
true if VFB has been closed, false if an error occurred.

◆ waitForVFBClosed() [2/2]

bool VRay::VRayRenderer::waitForVFBClosed ( const int  timeout) const

Waits for the VFB window to be closed or hidden.

Parameters
timeoutin milliseconds
Returns
true if VFB has been closed, false if timeout or error occurred.

The documentation for this class was generated from the following file: