This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com
This class is used to keep track of point and polygon selections. Each method will raise an exception when a host object is established, but not alive anymore.
Get the number of selected elements.
| Return type: | int |
|---|---|
| Returns: | The number of selected elements. |
Get the number of segments that contain elements. For example: the selections 0..4, 6..7, 9..12 would be three segments. This method would return 3 and GetCount would return 11.
| Return type: | int |
|---|---|
| Returns: | The number of selected segments. |
Selects an element.
| Parameter: | num (int) – The element index to select. |
|---|---|
| Return type: | bool |
| Returns: | True if the element was already selected. |
Selects all elements from in the given range.
Note
All previous selections are cleared.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | Success of selecting the elements. |
Deselects an element.
| Parameter: | num (int) – The element index to deselect. |
|---|---|
| Return type: | bool |
| Returns: | True if the element was already deselected. |
Deselect all elements.
| Return type: | bool |
|---|---|
| Returns: | Success of deselecting all elements. |
Toggles the selection state of an element.
| Parameter: | num (int) – The index of the element to toggle. |
|---|---|
| Return type: | bool |
| Returns: | Success of changing the selection state of the element. |
Toggle the selection state of all elements in the given range.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | Success of changing the selection state. |
Selects all elements that are selected in src.
| Parameter: | src (BaseSelect) – The source selection object. |
|---|---|
| Return type: | bool |
| Returns: | True if successful, otherwise False. |
Deselects all elements that are selected in src.
| Parameter: | src (BaseSelect) – The source selection object. |
|---|---|
| Return type: | bool |
| Returns: | True if successful, otherwise False. |
Make a duplicate of this selection object with its elements.
| Return type: | BaseSelect |
|---|---|
| Returns: | The cloned BaseSelect or None if failed. |
Returns the dirty counter of the selection. This counter is increased every time a function is called that changes the selection.
| Return type: | int |
|---|---|
| Returns: | Dirty counter. |
Copy the selection elements in this selection object to another BaseSelect.
| Parameter: | dest (BaseSelect) – The destination selections object. |
|---|---|
| Return type: | bool |
| Returns: | Success of copying the selection elements. |
Set all selected elements in a list.
| Parameter: | states (iteratable object with int members) – The id elements. |
|---|---|
| Return type: | bool |
| Returns: | Success or fail. |
Returns all selected elements in a list.
| Return type: | list of int |
|---|---|
| Returns: | The list |
Returns if the host object is still alive.
| Return type: | int |
|---|---|
| Returns: | Returns 2 if the BaseSelect instance has no host object. Returns 1 if the host object is alive if set and returns 0 if the object is not alive. |