c4d.modules.volume.VolumeBuilder

New in version R20.

The volume builder object class of type Ovolumebuilder.

Inheritance

Members

VolumeBuilder.__init__()

Creates a VolumeBuilder.

Return type:c4d.modules.volume.VolumeBuilder
Returns:A VolumeBuilder.
VolumeBuilder.InputObjectIsChild(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(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(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:c4d.BaseObject
Returns:The input object at index. None if it is a folder or if the function failed.
VolumeBuilder.GetInputObjectByType(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:

Tuple[c4d.BaseObject, int]

Returns:

The input object and its index. None if the function failed.

VolumeBuilder.GetListEntryCount()

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(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(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 the VolumeBuilder, 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()

Clears the objects list.

VolumeBuilder.GetSettingsContainerForIndex(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:c4d.BaseContainer
Returns:The settings container for the object. None if it is a folder/filter or if the function failed.
VolumeBuilder.GetSettingsContainerForObject(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:c4d.BaseContainer
Returns:The settings container for the object. None if it is a folder/filter or if the function failed.
VolumeBuilder.SetBoolMode(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(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(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(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(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(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(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(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.