-
Notifications
You must be signed in to change notification settings - Fork 10
vray objectProperties
Allows to create and remove object properties to nodes.
vray("objectProperties", subCommand, type, *args)
This command is used a lot by the create>Vray menu in Maya's main menu bar.
It's used in the Object Properties, Mesh Lights, V-Ray Fur, V-Ray Displacement, V-Ray Renderable Curve submenus.
The command always operates on the current selected nodes.
The command does NOT return the created/deleted nodes and you can not specify a direct name. A way to work around this is to get the connected sets before running the command and then after the command to get the new/removed sets. You can then use this information to do your operation on the new nodes.
###Flags
######subcommand
The subCommand
flag supports the following string values:
-
add_single: Apply single object properties node to selection
-
add_multiple: Apply multiple object properties nodes to selection
-
remove: Remove object properties from selection
-
remove_sub: Remove object properties from selection and sub-hierarchy
-
assign_existing: Assigns an existing object properties to selection. (uses
*args
for the node's name)
######type
The type
flag is optional, without it it will create simple object properties. Though you can also specify the following types:
-
None (as in: leave it out) (default: Object properties)
-
VRayLightMesh
-
VRayFur
-
VRayDisplacement
-
VRayRenderableCurve
-
VRayBakeOptions
######*args
Some subcommands
can have optional data arguments, thus extra *args.
Known list:
-
assign_existing
uses the first argument in *args as the name of the node that should be assigned.
mc.vray("objectProperties", "assign_existing", "VRayObjectProperties", "myObjectPropertiesName")
To apply a single object properties to your current selection:
mc.vray("objectProperties", "add_single")
To apply multiple VRayDisplacement object properties to your current selection (one per node in selection):
mc.vray("objectProperties", "add_multi", "VRayDisplacement")
If you use add_single
or add_multiple
with an invalid type you will get the following error:
# Error: line 1: The source attribute '.outConnect' cannot be found. #
On the other hand using remove
or remove_sub
on an invalid/unknown type will not raise any error.