Each scene graph or document node has its own set of attributes depending on its type. Attributes can be seen and modified through a Properties view.
You can directly modify attributes of a scene graph or document node.
- Select the node.
- Modify an attribute value by using corresponding widget in a Properties view.
A attribute value is inherited from the parent hierarchy when checkbox at the right of the attribute widget is not highlighted.
- Select the node.
- Override the value by checking in the Properties.
In the scene graph the highest node in the hierarchy is the project document itself. It is visible in the Node List as Document.
- Select Document in the Node List view.
- Modify the attribute value.
Dynamic attributes are user provided attributes attached to the hierarchy. These values can be used by shaders and AOVs, for instance as RGB ids in Id passes.
To create a dynamic attribute
- Select the scene graph node.
- In the Dynamic Attributes tab, choose the attribute name and type (or choose a preset from the name dropdown list.)
- Click the Add button.
Remove a Dynamic Attribute by unchecking the button at its right.
Create dynamic attributes with Autodesk Maya® or Alembic
In the Autodesk Maya® workflow, simply add in Maya a dynamic string attribute called 'GuerillaAttrToExport' on the transform containing the attributes to export. Set the attribute with some comma-separated Maya attributes name like : 'Attr1,Attr2,Attr3'. During the next export, Maya to Guerilla will bake the Attr1, Attr2 and Attr3 attributes.
In the Alembic workflow, Guerilla Render creates dynamic attributs for every int, float, string, vector attributes attached to the Alembic objects.
Read a dynamic attribute from a SL box
One can use the function renderattr to read a dynamic attribute in a shader SL box :
float id = renderattr ("id", 0); color color = renderattr ("ExtraColor", color (1,0,1)); srting texturename = renderattr ("TextureName", "");