c4d.modules.volume.VolumeBuilder¶
-
class
c4d.modules.volume.
VolumeBuilder
¶ The volume builder object class of type Ovolumebuilder.
New in version R20.
Methods Signatures
Creates a |
Checks if object at index in the object list is a child of the generator. |
|
Returns the number of objects in the list. |
|
Retrieves the input object referenced at the given index. |
|
Retrieves the input object with the given type. |
|
Returns the number of elements in the objects list containing folders. |
|
Adds a valid object from the document to the objects list. |
|
Removes the object in the list at the given index. |
|
Clears the objects list. |
|
Returns the internal container for the settings of an input object at the given index. |
|
Returns the internal container for the settings of an input object. |
|
Sets the bool mode for the input object at index. |
|
Gets the bool mode for the input object at index. |
|
Sets the mix mode for the input object at index. |
|
Gets the mix mode for the input object at index. |
|
Sets the enabled state for the input object at index. |
|
Gets the enabled state for the input object at index. |
|
Sets the selection state for the input object at index. |
|
Gets the selection state for the input object at index. |
|
Sets the mix vector mode for the index. |
|
Gets the mix vector mode for the index. |
Inheritance
Parent Class:
Methods Documentation
-
VolumeBuilder.
__init__
(self)¶ Creates a
VolumeBuilder
.
-
VolumeBuilder.
InputObjectIsChild
(self, index)¶ Checks if object at index in the object list is a child of the generator.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the list object to check.
- Return type
bool
- Returns
True if the input object is a child, otherwise False.
-
VolumeBuilder.
GetInputObjectCount
(self, countDouble=True)¶ Returns the number of objects in the list.
Note
The function does not count folders.
- Parameters
countDouble (bool) – If True the objects that are present multiple times in the list are counted multiple times.
- Return type
int
- Returns
The number of objects in the object list.
-
VolumeBuilder.
GetInputObject
(self, index)¶ Retrieves the input object referenced at the given index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object to access.
- Return type
Optional[c4d.BaseObject]
- Returns
The input object at index. None if it is a folder or if the function failed.
-
VolumeBuilder.
GetInputObjectByType
(self, type, startIndex)¶ Retrieves the input object with the given type.
- Parameters
type (int) – The type of object to access.
startIndex (int) – The index to start the search.
- Return type
Optional[Tuple[c4d.BaseObject, int]]
- Returns
The input object and its index. None if the function failed.
-
VolumeBuilder.
GetListEntryCount
(self)¶ Returns the number of elements in the objects list containing folders.
- Return type
int
- Returns
The number of elements in the object list.
-
VolumeBuilder.
AddSceneObject
(self, object, index=0)¶ Adds a valid object from the document to the objects list.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
object (c4d.BaseObject) – The object that should be added to the objects list.
index (int) – The index the object should be added to.
- Return type
bool
- Returns
True if the object was added successfully, otherwise False.
-
VolumeBuilder.
RemoveObject
(self, index)¶ Removes the object in the list at the given index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.If the object is a child of theVolumeBuilder
, it will be automatically readded to the list.Removing the object from the hierarchy would prevent that.- Parameters
index (int) – The index of the object to remove.
- Return type
bool
- Returns
True if the object was removed successfully, otherwise False.
-
VolumeBuilder.
ClearInputObjects
(self)¶ Clears the objects list.
-
VolumeBuilder.
GetSettingsContainerForIndex
(self, index)¶ Returns the internal container for the settings of an input object at the given index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.Allows to change the settings that control the specific conversion of an input object.- Parameters
index (int) – The index of the object in the list.
- Return type
Optional[c4d.BaseContainer]
- Returns
The settings container for the object. None if it is a folder/filter or if the function failed.
-
VolumeBuilder.
GetSettingsContainerForObject
(self, object)¶ Returns the internal container for the settings of an input object.
Note
Allows to change the settings that control the specific conversion of an input object.
- Parameters
object (c4d.BaseObject) – The input object in the objects list.
- Return type
Optional[c4d.BaseContainer]
- Returns
The settings container for the object. None if it is a folder/filter or if the function failed.
-
VolumeBuilder.
SetBoolMode
(self, index, boolmode)¶ Sets the bool mode for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
boolmode (int) –
The bool mode to set:
BOOLTYPE_NONE
None.
BOOLTYPE_UNION
Union.
BOOLTYPE_DIFF
Difference.
BOOLTYPE_INTERSECT
Intersection.
-
VolumeBuilder.
GetBoolMode
(self, index)¶ Gets the bool mode for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
- Return type
int
- Returns
The bool mode:
BOOLTYPE_NONE
None.
BOOLTYPE_UNION
Union.
BOOLTYPE_DIFF
Difference.
BOOLTYPE_INTERSECT
Intersection.
-
VolumeBuilder.
SetMixMode
(self, index, mixmode)¶ Sets the mix mode for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
mixmode (int) –
The mix mode to set:
MIXTYPE_NONE
None.
MIXTYPE_NORMAL
Normal.
MIXTYPE_MAX
Maximum.
MIXTYPE_MIN
Minimum.
MIXTYPE_ADD
Addition.
MIXTYPE_SUBTRACT
Substract.
MIXTYPE_MULTIPLY
Multiply.
MIXTYPE_DIVIDE
Division.
-
VolumeBuilder.
GetMixMode
(self, index)¶ Gets the mix mode for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
- Return type
int
- Returns
The mix mode:
MIXTYPE_NONE
None.
MIXTYPE_NORMAL
Normal.
MIXTYPE_MAX
Maximum.
MIXTYPE_MIN
Minimum.
MIXTYPE_ADD
Addition.
MIXTYPE_SUBTRACT
Substract.
MIXTYPE_MULTIPLY
Multiply.
MIXTYPE_DIVIDE
Division.
-
VolumeBuilder.
SetEnable
(self, index, enable)¶ Sets the enabled state for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
enable (bool) – The enabled state to set.
-
VolumeBuilder.
GetEnable
(self, index)¶ Gets the enabled state for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
- Return type
bool
- Returns
True if the object is enabled, otherwise False.
-
VolumeBuilder.
SetSelected
(self, index, select)¶ Sets the selection state for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
select (bool) – The The selection state to set.
-
VolumeBuilder.
GetSelected
(self, index)¶ Gets the selection state for the input object at index.
Note
Because the list is a tree, index depends on the position shown in the UI.This means children are iterated first.- Parameters
index (int) – The index of the object in the list.
- Return type
bool
- Returns
True if the object is selected, otherwise False.
-
VolumeBuilder.
SetMixVectorMode
(self, index, mixmode)¶ Sets the mix vector mode for the index.
- Parameters
index (int) – The index of the object to set the mix vector mode for.
mixmode (int) –
The mix vector mode to set.
Value
MIXVECTORTYPE_NONE
MIXVECTORTYPE_NORMAL
MIXVECTORTYPE_ADD
MIXVECTORTYPE_SUBTRACT
MIXVECTORTYPE_CROSS
-
VolumeBuilder.
GetMixVectorMode
(self, index)¶ Gets the mix vector mode for the index.
- Parameters
index (int) – The index of the object to get the mix vector mode for.
- Return type
int
- Returns
The mix vector mode for the object at the given index.
Value
MIXVECTORTYPE_NONE
MIXVECTORTYPE_NORMAL
MIXVECTORTYPE_ADD
MIXVECTORTYPE_SUBTRACT
MIXVECTORTYPE_CROSS