Syntax
- set(attribute, value)
Parameters
- attribute—selectorName of shape attribute to set.
- value—(bool, float, string, bool [], float[], string[] - same type as attribute)Value to assign to shape attribute.
Note:
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 CGA 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.
|