c4d.VoronoiFracture

class c4d.VoronoiFracture
A VoronoiFracture object represents a Voronoi Fracture MoGraph generator.
The class provides safe access to the point sources referenced, owned and used by the generator.

New in version R18.039.

Methods Signatures

VoronoiFracture.__init__(self)

rtype

c4d.VoronoiFracture

VoronoiFracture.GetSourcesCount(self)

Returns the number of elements in the Sources list, including point generators.

VoronoiFracture.GetSource(self, index)

Retrieves the object referenced at the given index.

VoronoiFracture.GetSourceByType(self, type[, startIndex])

Retrieves the object referenced in the Sources list with the given type.

VoronoiFracture.RemoveSource(self, index)

Removes the source element in the list at the given index.

VoronoiFracture.AddPointGenerator(self, type[, shaderType])

Adds a new point generator.

VoronoiFracture.AddSceneObject(self, object)

Adds a valid object from the scene to the Sources list.

VoronoiFracture.ClearSources(self)

Clears the Sources list and deletes all point generators.

VoronoiFracture.GetSourceSettingsContainerForIndex(self, index)

Returns the internal container for the settings of an external source input, like a polygon object as point source.

VoronoiFracture.GetSourceSettingsContainerForObject(self, object)

Returns the internal container for the settings of an external source input, like a polygon object as point source.

Inheritance

Parent Class:

Methods Documentation

VoronoiFracture.__init__(self)
Return type

c4d.VoronoiFracture

Returns

The new Voronoi fracture object.

VoronoiFracture.GetSourcesCount(self)

Returns the number of elements in the Sources list, including point generators.

Return type

int

Returns

The number of elements in the Sources list.

VoronoiFracture.GetSource(self, index)

Retrieves the object referenced at the given index.

Note

If index references a point generator that point generator object is returned.

Parameters

index (int) – The index of the source element to access.

Return type

c4d.BaseObject

Returns

The object at the given index, or None if the method failed.

VoronoiFracture.GetSourceByType(self, type, startIndex=- 1)

Retrieves the object referenced in the Sources list with the given type.

Note

If multiple objects with the given type exist the first is returned.

Parameters
  • type (int) – The type of object to access.

  • startIndex (int) – The index to start the search.

Return type

tuple(c4d.BaseObject, int)

Returns

A tuple with the found source object and its index, or None if the method failed.

VoronoiFracture.RemoveSource(self, index)

Removes the source element in the list at the given index.

Note

If the index references a point generator it is also deleted from the internal list.

Parameters

index (int) – The index of the source element to remove.

Return type

bool

Returns

True if the element was removed successfully, otherwise False.

VoronoiFracture.AddPointGenerator(self, type, shaderType=- 1)

Adds a new point generator.

Parameters
  • type (int) – The type of point generator, either ID_POINTCREATOR_CREATORTYPE_DISTRIBUTION or ID_POINTCREATOR_CREATORTYPE_SHADER.

  • shaderType (int) – If a Shader generator is created a shader of this type is automatically added to it.

Return type

tuple(c4d.BaseObject, int)

Returns

A tuple with the added point generator and its index, or None if the method failed.

VoronoiFracture.AddSceneObject(self, object)

Adds a valid object from the scene to the Sources list.

Parameters

object (c4d.BaseObject) – The scene object that should be added.

Return type

tuple(bool, int)

Returns

A tuple with the scene object addition state and its index, or None if the method failed.

VoronoiFracture.ClearSources(self)

Clears the Sources list and deletes all point generators.

VoronoiFracture.GetSourceSettingsContainerForIndex(self, index)

Returns the internal container for the settings of an external source input, like a polygon object as point source.

New in version R19.

Note

Allows to change the settings that control for example the distribution of points in the object and the point count.

Parameters

index (int) – The index of the object in the Sources list.

Return type

c4d.BaseContainer

Returns

The container for the source settings if the index fits to an external Source input, otherwise None.

VoronoiFracture.GetSourceSettingsContainerForObject(self, object)

Returns the internal container for the settings of an external source input, like a polygon object as point source.

New in version R19.

Note

Allows to change the settings that control for example the distribution of points in the object and the point count.

Parameters

object (c4d.BaseObject) – The external source object in the Sources list.

Return type

c4d.BaseContainer

Returns

The container for the source settings if the object is in the Sources list, otherwise None.