|
static int | CopyPlugins (VRayRenderer srcRenderer, VRayRenderer dstRenderer, IEnumerable< object > includeListOfPlugins, IEnumerable< object > excludeListOfPlugins, OnCopyPluginParamsPreCreate preCreateCallback, OnCopyPluginParamsPostCreate postCreateCallback) |
| Copies some of the specified plugins in the includeListOfPlugins list of the srcRenderer and some of their successors, depending on an exludeListOfPlugins, a user-defined pre-create callback to the dstRenderer and at the end, invoking a user-defined post-create callback on the created plugins after all have been processed. REMARK: if a plugin scheduled to be visited by the preCreateCallback is deleted, it will not be counted as an error and it will be skipped as well as the successors that were attached to it as we have no reference to them. WARNING: One should decide how to handle singleton plugins (plugins which have at most one instance in a scene)! WARNING: We highly recommend that you don't modify plugins (including deletion, clearing the scene etc.) of srcRenderer and dstRenderer for the whole duration of this call! Doing so could lead to unexpected results including crashes. If the includeListOfPlugins is empty, we will invoke the preCreateCallback on all the plugins of the srcRenderer (a part from the rtEngine). If the includeListOfPlugins is non-empty, we will surely invoke the preCreateCallback on all plugins in the list and all successors which have been approved by the preCreateCallback invocations. If the excludeListOfPlugins is empty, it does not affect anything. If the excludeListOfPlugins is non-empty, then the mentioned plugins in it will not be scheduled to be visited by the preCreateCallback (even if they are mentioned explicitly in the includeListOfPlugins or implicitly via relatedness to a plugin mentioned in the includeListOfPlugins) and will surely not be copied. Their successors will also not be scheduled, but are not banned to be scheduled by being in another plugin's successor list. What can you do with the preCreateCallback? You get as arguments the dstRenderer and the srcPlugin. You will return a structure PreCreateCallbackOptions with some fields described in PreCreateCallbackOptions. What can you do with the postCreateCallback? You get as arguments the dstPlugin, srcPluginName, autoRenamedResult and preCreateCallbackReturnedName. Some more information about some of the arguments: More...
|
|
static int | CopyPlugins (VRayRenderer srcRenderer, VRayRenderer dstRenderer, string pluginType, OnCopyPluginParamsPreCreate preCreateCallback, OnCopyPluginParamsPostCreate postCreateCallback) |
| Copies some of the specified plugins of type (class) pluginType of the srcRenderer and some of their successors, depending on a user-defined pre-create callback to the dstRenderer and at the end, invoking a user-defined post-create callback on the created plugins after all have been processed. it will be skipped as well as the successors that were attached to it as we have no reference to them. WARNING: One should decide how to handle singleton plugins (plugins which have at most one instance in a scene)! WARNING: We highly recommend that you don't modify plugins (including deletion, clearing the scene etc.) of srcRenderer and dstRenderer for the whole duration of this call! Doing so could lead to unexpected results including crashes. What can you do with the preCreateCallback? You get as arguments the dstRenderer and the srcPlugin. You will return a structure PreCreateCallbackOptions with some fields described in PreCreateCallbackOptions. What can you do with the postCreateCallback? You get as arguments the dstPlugin, srcPluginName, autoRenamedResult and preCreateCallbackReturnedName. Some more information about some of the arguments: More...
|
|
static int | CopyPlugins< T > (VRayRenderer srcRenderer, VRayRenderer dstRenderer, OnCopyPluginParamsPreCreate preCreateCallback, OnCopyPluginParamsPostCreate postCreateCallback) |
| Copies some of the specified plugins of type (class) pluginType of the srcRenderer and some of their successors, depending on a user-defined pre-create callback to the dstRenderer and at the end, invoking a user-defined post-create callback on the created plugins after all have been processed. REMARK: if a plugin scheduled to be visited by the preCreateCallback is deleted, it will not be counted as an error and it will be skipped as well as the successors that were attached to it as we have no reference to them. WARNING: One should decide how to handle singleton plugins (plugins which have at most one instance in a scene)! WARNING: We highly recommend that you don't modify plugins (including deletion, clearing the scene etc.) of srcRenderer and dstRenderer for the whole duration of this call! Doing so could lead to unexpected results including crashes. What can you do with the preCreateCallback? You get as arguments the dstRenderer and the srcPlugin. You will return a structure PreCreateCallbackOptions with some fields described in PreCreateCallbackOptions. What can you do with the postCreateCallback? You get as arguments the dstPlugin, srcPluginName, autoRenamedResult and preCreateCallbackReturnedName. Some more information about some of the arguments: More...
|
|
static PluginLink[] | GetChildPlugins (Plugin root, bool recursive) |
| Returns a list of plugin dependency links. Any reference to another plugin from a property (including list properties) will append a PluginLink struct to the list. Properties are checked in the order of their definition in the plugin descriptor. More...
|
|
static float | GetIESPrescribedIntensity (string fileName) |
| Returns the prescribed intensity from an ies file More...
|
|
static PluginLink[] | GetParentPlugins (Plugin child) |
| Returns a list of plugins that directly reference the given child plugin. More...
|
|
Various helper methods are grouped here
Copies some of the specified plugins in the includeListOfPlugins list of the srcRenderer and some of their successors, depending on an exludeListOfPlugins, a user-defined pre-create callback to the dstRenderer and at the end, invoking a user-defined post-create callback on the created plugins after all have been processed. REMARK: if a plugin scheduled to be visited by the preCreateCallback is deleted, it will not be counted as an error and it will be skipped as well as the successors that were attached to it as we have no reference to them. WARNING: One should decide how to handle singleton plugins (plugins which have at most one instance in a scene)! WARNING: We highly recommend that you don't modify plugins (including deletion, clearing the scene etc.) of srcRenderer and dstRenderer for the whole duration of this call! Doing so could lead to unexpected results including crashes. If the includeListOfPlugins is empty, we will invoke the preCreateCallback on all the plugins of the srcRenderer (a part from the rtEngine). If the includeListOfPlugins is non-empty, we will surely invoke the preCreateCallback on all plugins in the list and all successors which have been approved by the preCreateCallback invocations. If the excludeListOfPlugins is empty, it does not affect anything. If the excludeListOfPlugins is non-empty, then the mentioned plugins in it will not be scheduled to be visited by the preCreateCallback (even if they are mentioned explicitly in the includeListOfPlugins or implicitly via relatedness to a plugin mentioned in the includeListOfPlugins) and will surely not be copied. Their successors will also not be scheduled, but are not banned to be scheduled by being in another plugin's successor list. What can you do with the preCreateCallback? You get as arguments the dstRenderer and the srcPlugin. You will return a structure PreCreateCallbackOptions with some fields described in PreCreateCallbackOptions. What can you do with the postCreateCallback? You get as arguments the dstPlugin, srcPluginName, autoRenamedResult and preCreateCallbackReturnedName. Some more information about some of the arguments:
- srcPluginName - A string that is the same as srcPlugin name.
- autoRenamedResult - An integer enumerable which is used to indicate how the renaming process has finished.
- preCreateCallbackReturnedName - A string that is the same as "Name" field in the returned structure in the preCreateCallback.
- Parameters
-
srcRenderer | The source renderer (a valid VRayRenderer object). All plugins in the following lists must be of this renderer. |
dstRenderer | The destination renderer (a valid VRayRenderer object). |
includeListOfPlugins | A list of the plugins (can have pluginRefs) that will be processed. Can be empty. |
excludeListOfPlugins | A list of the plugins (can have pluginRefs) that will be excluded from being processed. Can be empty. |
preCreateCallback | Called on each plugin in the includeListOfPlugins and some of their successors. |
postCreateCallback | Called on each newly created plugin in the dstRenderer. |
- Returns
- On success the non-negative number of successfully copied (plus overwritten) plugins and -1 on error.