9.5.2

Table Of Contents
1098 CHAPTER 22
XPRESSO EDITOR 1099
Example
Suppose you are using an Object List iterator with seven cubes (see example
picture above). Now suppose you want to reposition all of the cubes except
the third one. Well, just chuck the third cube out of the object list,” you might
suggest. Thats one solution, certainly. However, a more interesting way and
in some cases perhaps the only way — is to use an ObjectIndex node instead.
Connect the Index output port to a Compare node and set the Compare nodes
Function to ‘!=’ and its Input 2 to 2’ (an index list starts with ‘0’, hence ‘2’
corresponds to the third sphere).
Next, connect the Compare node’s output to the input port of the node that
sets the position for the cubes (see above). Now, when the index reaches ‘2’
during the iteration, the Compare node will switch off the position assignment
and the third cube won’t have its position changed.
Point
Here the node outputs two values: the object’s total number of points (here, eight) and the position of
the point whose index value is 4.
This node gives you direct access to an object’s number of points and their positions and point
normals. First create an Object node for the object whose point data you want to access. Click the
Object node’s outputs menu (red square) and choose Object from the menu to create an Object port.
Connect this Object port to the Point node’s Object port.
The point normal vector is exactly one unit in length and is always perpendicular to the point. The
direction is calculated using the positions of the surrounding surfaces. Hence if the object has no
surfaces, the point normals cannot be calculated accurately.
The Point node works with global or local point coordinates, depending on the Matrix Mode setting
in the Attribute manager.
To read the position of a point:
Connect an Object node to the Point node as described above, via the Object
port.
Pass the number of the point that should be output to the Point Index port.
This index number corresponds to the numbering shown in the Structure
manager.
The Position Port will output the point’s position as a vector.