This page provides information how to use the vray objectProperties command in MEL.
Overview
With the vray objectProperties command you can create, assign or remove object properties from objects. These commands correspond to the Create > V-Ray > Object Properties menu, V-Ray shelf, and V-Ray menu.
Syntax
The vray objectProperties runs without flags. Instead, valid arguments need to be given in strings:
vray objectProperties [add_single | add_multiple | remove | remove_sub | showInAE | assign_existing] <PROPERTY TYPE> <NODE NAME> <force>
Action | Description |
---|---|
add_single | Applies single object properties node to the selected object(s). |
add_multiple | Applies multiple object properties nodes to the selected objects. |
remove | Removes object properties from selection. It does not delete the object property node itself. |
remove_sub | Removes object properties from selection and sub-hierarchy. It does not delete the object property node itself. |
showInAE | Switches the focus of the Attribute Editor tab to show the object property node of the selected object. |
assign_existing | Assigns an existing object property node to the selected object. |
Command Argument | Description |
---|---|
PROPERTY TYPE | Valid property types are the following strings: VRayObjectProperties |
NODE NAME | Specifies the name of an existing node when assign_existing is used. |
force | Force creates an empty object properties node when the selection is empty. |
Please note the following:
- <force> is used only when add_single/add_multiple is executed to denote that the specified object property will be created as an empty set;
- <force> should be on second or third position after "vray objectProperties" command;
- If no property type is specified, the command assumes "VRayObjectProperties" is used as an object property type;
- when add_single/add_multiple is executed, the command returns a list of the names of the created object properties.
Examples
Apply single object property node (of node type VRayObjectProperties) to the selected object(s):
vray objectProperties "add_single"
Apply multiple object properties nodes (of node type VRayObjectProperties) to the selection (one property per node in the selection):
vray objectProperties "add_multiple"
Apply multiple object properties nodes (of node type VRayDisplacement) to the selection (one property per node in the selection):
vray objectProperties "add_multiple" "VRayDisplacement"
Remove object properties (of node type VRayObjectProperties) from selection:
vray objectProperties "remove"
Remove object properties (of node type VRayDisplacement) from selection:
vray objectProperties "remove" "VRayDisplacement"
Remove object properties (of node type VRayObjectProperties) from selection and sub-hierarchy:
vray objectProperties "remove_sub"
Force create an empty object properties node:
vray objectProperties "add_single" "force"
vray objectProperties "add_multiple" "force"
Create and apply a single object property node to the selection:
vray "objectProperties" "add_single" "VRayObjectProperties"
vray "objectProperties" "add_single" "VRayLightMesh"
Switches focus on the Attribute Editor tab of the object property node connected to the selected object:
vray objectProperties "showInAE" "VRayObjectProperties"
Assign an existing object property node to the selected object:
vray objectProperties "assign_existing" "VRayDisplacement" "pCylinder1_vrayDisplacement"