Synopsis
- set(attribute, value)
Parameters
- attribute—stringName of shape attribute to set.
- value—{ bool | float | string }Value to assign to shape attribute. Note that not all shape attributes are writable.
Description
The set operation assigns a value to a shape attribute of the current shape. There are two kinds of shape attributes: builtin attributes such as material.color or scope.tx and generic attributes, which are declared as rule attributes (see Attributes).
Related
Examples
Builtin shape attributes
|
|
Generic shape attributes
Store floor index in a generic attribute, floorHeight. The attribute is then used to color the windows on every 3rd floor is pink.
|