Skip to content

alijafargholi/mayaVrayCommand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

alt vray_logo_image

Vray Commands in Maya 👊

📣 Note: Following examples are using PyMel. Please make sure you've imported the pymel.core

   import pymel.core as pm

getRequiredAttrs

Description: Gets the required vray attributes of a node.

Usage: vray getRequiredAttrs <NODE NAME - STRING>


getOptionalAttrs

Gets the optional vray attributes of a node.

Description: Gets the optional vray attributes of a node.

Usage: vray getOptionalAttrs <NODE NAME - STRING>

Example
   # Create a Cube
   foo = pm.polyCube()
   # Print out the optional attribute of the Cube 
   pm.vray("getOptionalAttrs", foo)

getRenderElements

Description: Prints all render elements.

Example
   pm.vray("getRenderElements")

getRenderElementsInScene

Description: Returns the render elements in the current scene. Pass 0|1 to include render elements from referenced scenes.

Usage: vray getRenderElementsInScene [1|0]

Example
   pm.vray("getRenderElementsInScene", 1)

getGUIHint

Description: Gets a GUI hint about a vray attribute of a node

Usage: vray getGUIHint <NODE NAME - STRING> <ATTRIBUTE NAME - STRING> <HINT NAME - STRING>


getAHint

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

Example
   renderElementName =  pm.vray("getRenderElements")[0]
   pm.vray("getAHint", "RenderElement", renderElementName, "label")
   # Result: [u'Atmospheric Effects'] #

addAttr

Description: Dynamically adds a vray attribute to a node.

Usage: vray addAttr <NODE NAME - STRING> <ATTRIBUTE NAME - STRING>

Example
   # Create a Cube
   foo = pm.polyCube()
   # Assign the vray object ID to the cube's transform node. 
   pm.vray("addAttr", foo[0].name(), "vrayObjectID")

updateGLSLAttr

Description: Updates GLSL attributes of a VRayTexGLSL node.

Usage: vray updateGLSLAttr <NODE NAME - STRING>


updateOSLAttr

Description: Updates OSL attributes of a VRayTexOSL/VRayMtlOSL node.

Usage: vray updateOSLAttr <NODE NAME - STRING>


saveCompiledGLSLShader

Description: Saves a compiled GLSL shader.

Usage: vray saveCompiledGLSLShader <IN FILE NAME - STRING> <OUT FILE NAME - STRING>


saveCompiledOSLShader

Description: Saves a compiled OSL shader.

Usage: vray saveCompiledOSLShader <IN FILE NAME - STRING> <OUT FILE NAME - STRING>


createAEMenu

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.


addAttributesFromGroup

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

Example
   # 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)

listLoadedPlugins

Description: Lists all loaded vray plugins from a given type.

Usage: vray listLoadedPlugins [texture|light|volume|brdf|material]

Example
   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'] #

addAttributesFromDll

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>


restoreMesh

Description: Restore the mesh from a proxy.

Usage: vray restoreMesh <NODE NAME - STRING


clearProxyPreviewCache

Description: Clears the proxy preview cache for all meshes or a particular one (name as parameter).


clearGeomCache

Description: Clears all cached geometry plugins.


clearBitmapCache

Description: Clears all cached bitmaps.


showVFB

Description: Shows the vfb window.


addVFBToPanel

Description: Adds the vfb to a panel.


removeVFBFromPanel

Description: Removes the vfb from panels.


physicalCameraFOV

Description: Syncs FOV and other viewport related attributes of one or all vray physical cameras to maya cameras so they match.


physicalCameraAutoShift

Description: Calculates a vertical shift for a physical camera so that the objects in the scene are straightened-up.


clearSwatchCache

Description: Clears the swatch image cache. Generally this should be called when loading a new scene.


setSSSPreset

Description: Sets the SSS preset.


setHair3Preset

Description: Sets a node's hair3 preset to a new one by index.


objectProperties

Description: Gets properties about an object of a given type.


getBlackBodyColor

Description: Gets the color of a black body for a given temperature.


getConfValue

Description: Load the value of a configuration option and return it.


setConfValue

Description: Set the value of a configuration option.


saveConfFile

Description: Saves the data from the XML parser to the VRay configuration settings file.


closeConfFile

Description: Delete the XML parser without saving the data to the settings file.


giMaps

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]

resolveServers

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


isVRmatEditorEnabled

Description: If the VRmat editor is enabled.


getVRmatList

Description: Gets a VRmat material list.

Usage: vray getVRmatList <MATERIAL NAME - STRING


vfbControl

Description: Control command for the vfb.


loadFromFile

Description: Loads materials from vrscene file.


getMtlsList

Description: Creates a list of plugins for all materials in the specified file.


loadFromFileInit

Description: Initializes importing from vrscene file. Usage: vray loadFromFileInit <FILE NAME - STRING>


loadFromFileEnd

Description: Finalizes vrscene file material importing.


exportLightmeterToCSV

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")

getLightmeterMaxValue

Description: Returns the maximum value of a lightmeter (for Direct/GI/Total light).

Usage: vray getLightmeterMaxValue <NODE NAME - STRING> [direct|gi|total]

Example
  pm.vray("getLightmeterMaxValue", "VRayLightMeter1", "total")

version

Description: Prints the version.

Example
  pm.vray("version")
  # Result: u'3.40.01' #

build

Description: Prints the build number.


About

Quick descriptions of available Vray commands inside Maya

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors