📣 Note: Following examples are using PyMel. Please make sure you've imported the pymel.core
import pymel.core as pmDescription: Gets the required vray attributes of a node.
Usage: vray getRequiredAttrs <NODE NAME - STRING>
Gets the optional vray attributes of a node.
Description: Gets the optional vray attributes of a node.
Usage: vray getOptionalAttrs <NODE NAME - STRING>
# Create a Cube
foo = pm.polyCube()
# Print out the optional attribute of the Cube
pm.vray("getOptionalAttrs", foo)Description: Prints all render elements.
pm.vray("getRenderElements")Description: Returns the render elements in the current scene. Pass 0|1 to include render elements from referenced scenes.
Usage: vray getRenderElementsInScene [1|0]
pm.vray("getRenderElementsInScene", 1)Description: Gets a GUI hint about a vray attribute of a node
Usage: vray getGUIHint <NODE NAME - STRING> <ATTRIBUTE NAME - STRING> <HINT NAME - STRING>
Description: A more general version of getGUIHint. Instead of node, it accepts classType and determines where to take the classes from.
Usage: vray getAHint <CLASS TYPE - STRING> <CLASS NAME - STRING> <HINT NAME - STRING
renderElementName = pm.vray("getRenderElements")[0]
pm.vray("getAHint", "RenderElement", renderElementName, "label")
# Result: [u'Atmospheric Effects'] #Description: Dynamically adds a vray attribute to a node.
Usage: vray addAttr <NODE NAME - STRING> <ATTRIBUTE NAME - STRING>
# Create a Cube
foo = pm.polyCube()
# Assign the vray object ID to the cube's transform node.
pm.vray("addAttr", foo[0].name(), "vrayObjectID")Description: Updates GLSL attributes of a VRayTexGLSL node.
Usage: vray updateGLSLAttr <NODE NAME - STRING>
Description: Updates OSL attributes of a VRayTexOSL/VRayMtlOSL node.
Usage: vray updateOSLAttr <NODE NAME - STRING>
Description: Saves a compiled GLSL shader.
Usage: vray saveCompiledGLSLShader <IN FILE NAME - STRING> <OUT FILE NAME - STRING>
Description: Saves a compiled OSL shader.
Usage: vray saveCompiledOSLShader <IN FILE NAME - STRING> <OUT FILE NAME - STRING>
Description: Creates the VRay AE menu for a given node.
Usage: vray createAEMenu <NODE NAME - STRING>Creates the VRay AE menu for a given node.
Description: Adds all the vray attributes from a group to the given node. Remove if executed twice (toggling on/off).
Usage: vray addAttributesFromGroup <NODE NAME - STRING> <GROUP INDEX - STRING> <SHOULD ADD - BOOLEAN> Where <BOOLEAN> is one of: 0|1
# Create a Cube and get its Shape node
foo = pm.polyCube()[0].getShape()
# Assign the Vray Round Edges attributes to the shape node
pm.vray("addAttributesFromGroup", foo, "vray_roundedges", 1)Description: Lists all loaded vray plugins from a given type.
Usage: vray listLoadedPlugins [texture|light|volume|brdf|material]
pm.vray("listLoadedPlugins", "light")
# Result: [u'LightAmbientMax',
u'LightDirectMax',
u'LightSpotMax',
u'LightOmniMax',
u'SunLight',
u'LightDirectModo',
u'LightDirect',
u'LightAmbient',
u'LightOmni',
u'LightSphere',
u'LightSpot',
u'MayaLightDirect',
u'LightRectangle',
u'LightMesh',
u'LightIESMax',
u'LightIES',
u'LightDome'] #Description: Adds all the attributes for a specific vray plugin. The plugin is read from a file and the name of the class is known.
Usage: vray addAttributesFromDll <NODE NAME - STRING> [texture|brdf|material|light|volume] <PLUGIN NAME - STRING>
Description: Restore the mesh from a proxy.
Usage: vray restoreMesh <NODE NAME - STRING
Description: Clears the proxy preview cache for all meshes or a particular one (name as parameter).
Description: Clears all cached geometry plugins.
Description: Clears all cached bitmaps.
Description: Shows the vfb window.
Description: Adds the vfb to a panel.
Description: Removes the vfb from panels.
Description: Syncs FOV and other viewport related attributes of one or all vray physical cameras to maya cameras so they match.
Description: Calculates a vertical shift for a physical camera so that the objects in the scene are straightened-up.
Description: Clears the swatch image cache. Generally this should be called when loading a new scene.
Description: Sets the SSS preset.
Description: Sets a node's hair3 preset to a new one by index.
Description: Gets properties about an object of a given type.
Description: Gets the color of a black body for a given temperature.
Description: Load the value of a configuration option and return it.
Description: Set the value of a configuration option.
Description: Saves the data from the XML parser to the VRay configuration settings file.
Description: Delete the XML parser without saving the data to the settings file.
This is used to save/reset the different GI maps.
Description: This is used to save/reset the different GI maps.
Usage:
- vray giMaps [save|info|load|mapinmemory] [irradiance|lightcache|globalphoton|causticsphoton]
- vray giMaps reset [irradiance|lightcache|photon]
Command to resolve a list of network names to IP addresses.
Description: Command to resolve a list of network names to IP addresses.
Usage: vray resolveServers <SERVER NAME 1 - STRING> <SERVER NAME 2 - STRING> ... <SERVER NAME N - STRING> Where N >= 1
Description: If the VRmat editor is enabled.
Description: Gets a VRmat material list.
Usage: vray getVRmatList <MATERIAL NAME - STRING
Description: Control command for the vfb.
Description: Loads materials from vrscene file.
Description: Creates a list of plugins for all materials in the specified file.
Description: Initializes importing from vrscene file.
Usage: vray loadFromFileInit <FILE NAME - STRING>
Description: Finalizes vrscene file material importing.
Description: Exports lightmeter data to a .csv file.
Usage: vray exportLightmeterToCSV <NODE NAME - STRING> <FILE NAME - STRING>
pm.vray("exportLightmeterToCSV", "VRayLightMeter1", r"PATH\foo.csv")Description: Returns the maximum value of a lightmeter (for Direct/GI/Total light).
Usage: vray getLightmeterMaxValue <NODE NAME - STRING> [direct|gi|total]
pm.vray("getLightmeterMaxValue", "VRayLightMeter1", "total")Description: Prints the version.
pm.vray("version")
# Result: u'3.40.01' #Description: Prints the build number.
