comp attribute

string comp.sel
float comp.index
float comp.total

The comp shape attributes give information about the last component split in the chain of the shape's predecessors.

comp.selA string containing the component split selector which selected the current shape (or it's predecessor, respectively) in the last component split.
comp.indexThe zero-based index into the group of shapes generated in the last component split.
comp.totalThe total number of components generated in the last component split.

Examples

Example

Index and total are per selector; for instance

...
primitiveCube()
comp(f) { front : Front | side : Side | all = All }

creates one Front shape with

  • comp.sel: front
  • comp.index: 0
  • comp.total: 1

and 3 Side shapes with

  • comp.sel: side
  • comp.index: 0,1,2
  • comp.total: 3

and 1 All shape with

  • comp.sel: all
  • comp.index: 0
  • comp.total: 1

Related