c4d.modules.mograph.MoData

Members

MoData.GetDirty([mask=DIRTYFLAGS_0])

Get dirty count. Can be used to check if something has changed.

Parameters:mask (int) –

Flags:

DIRTYFLAGS_0 None.
DIRTYFLAGS_MATRIX Matrix changed.
DIRTYFLAGS_DATA Container changed.
DIRTYFLAGS_SELECT Checks all valid selections of the object, e.g. points, edge, polys.
DIRTYFLAGS_CACHE Checks if the cache of an object has been changed (rebuilt).
DIRTYFLAGS_CHILDREN Checks if the children are dirty.
DIRTYFLAGS_SELECTION_OBJECTS For BaseDocument, object selections have changed.
DIRTYFLAGS_SELECTION_TAGS For BaseDocument, tag selections have changed.
DIRTYFLAGS_SELECTION_MATERIALS For BaseDocument, material selections have changed.
Return type:int
Returns:Dirty count.
MoData.SetDirty([mask=DIRTYFLAGS_0])

Mark the data as dirty.

Parameters:mask (int) –

Flags:

DIRTYFLAGS_0 None.
DIRTYFLAGS_MATRIX Matrix changed.
DIRTYFLAGS_DATA Container changed.
DIRTYFLAGS_SELECT Checks all valid selections of the object, e.g. points, edge, polys.
DIRTYFLAGS_CACHE Checks if the cache of an object has been changed (rebuilt).
DIRTYFLAGS_CHILDREN Checks if the children are dirty.
DIRTYFLAGS_SELECTION_OBJECTS For BaseDocument, object selections have changed.
DIRTYFLAGS_SELECTION_TAGS For BaseDocument, tag selections have changed.
DIRTYFLAGS_SELECTION_MATERIALS For BaseDocument, material selections have changed.
MoData.Clear(reset)

Clear the data in the arrays.

Parameters:reset (bool) – True will fill the arrays with their default values.
MoData.Read(hf)

Read the data from a hyper file.

Parameters:hf (HyperFile) – The hyper file to read from.
Return type:bool
Returns:True if the data was read, otherwise False.
MoData.Write(hf)

Write the data to a hyper file.

Parameters:hf (HyperFile) – The hyper file to write to.
Return type:bool
Returns:True if the data was written, otherwise False.
MoData.GetMemorySize()

Get the size of the data in bytes.

Return type:int
Returns:Size of the data.
MoData.SetCount(cnt)

Set the length of the arrays.

Parameters:cnt (int) – The new length of the arrays.
Return type:bool
Returns:True if the length was set, otherwise False.
MoData.GetCount()

Get the length of the arrays.

Return type:int
Returns:The length of the arrays.
MoData.GetArrayCount()

Get the number of arrays.

Return type:int
Returns:The number of arrays.
MoData.GetArrayDescID(index)

Get the description ID for the specified array index.

Parameters:index (int) – The index of the array.
Raises IndexError:
 If the array index is out of range : 0<=index<GetArrayCount().
Return type:DescID
Returns:The description ID.
MoData.GetArrayID(index)

Get the ID for the specified array index.

Parameters:index (int) – The index of the array.
Raises IndexError:
 If the array index is out of range : 0<=index<GetArrayCount().
Return type:int
Returns:The retrieved ID:
MODATA_MATRIX Matrix Matrix of the clone.
MODATA_COLOR Vector Color of the clone.
MODATA_SIZE Vector Size of the clone.
MODATA_UVW Vector UV position of the clone.
MODATA_FLAGS long Flags:
MOGENFLAG_CLONE_ON Particle is visible.
MOGENFLAG_DISABLE Particle is permanently disabled.
MOGENFLAG_BORN Particle is just generated (internal use only).
MOGENFLAG_MODATASET The MoData has been set and doesn’t need the input of the transform panel.
MOGENFLAG_COLORSET The MoData color has been set and doesn’t need to be updated.
MOGENFLAG_TIMESET The MoData time has been set and doesn’t need to be updated.
MODATA_WEIGHT float Weight of the clone.
MODATA_CLONE float Clone Offset (picks which child of the Cloner gets cloned or the blending between those children).
MODATA_TIME float Time offset of the clone.
MODATA_LASTMAT Matrix Previous frame particle matrix.
MODATA_STARTMAT Matrix Matrix at the particle’s birth.
MODATA_ALT_INDEX long Alternative index value that can be used for instance by the Step Effector when cloned over a spline with an offset.
MODATA_FALLOFF_WGT float Falloff weight.
MODATA_SPLINE_SEGMENT long The segment index, mostly used with the MoSpline (currently unused).
MODATA_GROWTH float Offset of growth for the particle on the MoSpline (currently unused).
MoData.GetArrayIndexType(index)

Get the data type of the specified array.

Parameters:index (int) – The index of the array.
Raises IndexError:
 If the array index is out of range : 0<=index<GetArrayCount().
Return type:int
Returns:Type:
DTYPE_BASELISTLINK BaseList2D
DTYPE_BOOL bool
DTYPE_BUTTON Button.
DTYPE_CHILDREN Children.
DTYPE_COLOR Color.
DTYPE_DYNAMIC GV dynamic.
DTYPE_FILENAME str
DTYPE_GROUP Group.
DTYPE_LONG long
DTYPE_MATRIX Matrix
DTYPE_MULTIPLEDATA Multiple data entry.
DTYPE_NONE None.
DTYPE_NORMAL Normal.
DTYPE_POPUP Popup.
DTYPE_REAL float
DTYPE_SEPARATOR Separator.
DTYPE_STATICTEXT Static text.
DTYPE_STRING str
DTYPE_SUBCONTAINER BaseContainer
DTYPE_TEXTURE Texturename.
DTYPE_TIME BaseTime
DTYPE_VECTOR Vector
MoData.GetArrayType(id)

Get the data type of the specified array.

Parameters:id (int) –

The ID of the array:

MODATA_MATRIX Matrix Matrix of the clone.
MODATA_COLOR Vector Color of the clone.
MODATA_SIZE Vector Size of the clone.
MODATA_UVW Vector UV position of the clone.
MODATA_FLAGS long Flags:
MOGENFLAG_CLONE_ON Particle is visible.
MOGENFLAG_DISABLE Particle is permanently disabled.
MOGENFLAG_BORN Particle is just generated (internal use only).
MOGENFLAG_MODATASET The MoData has been set and doesn’t need the input of the transform panel.
MOGENFLAG_COLORSET The MoData color has been set and doesn’t need to be updated.
MOGENFLAG_TIMESET The MoData time has been set and doesn’t need to be updated.
MODATA_WEIGHT float Weight of the clone.
MODATA_CLONE float Clone Offset (picks which child of the Cloner gets cloned or the blending between those children).
MODATA_TIME float Time offset of the clone.
MODATA_LASTMAT Matrix Previous frame particle matrix.
MODATA_STARTMAT Matrix Matrix at the particle’s birth.
MODATA_ALT_INDEX long Alternative index value that can be used for instance by the Step Effector when cloned over a spline with an offset.
MODATA_FALLOFF_WGT float Falloff weight.
MODATA_SPLINE_SEGMENT long The segment index, mostly used with the MoSpline (currently unused).
MODATA_GROWTH float Offset of growth for the particle on the MoSpline (currently unused).
MoData.GetArrayIndex(id)

Get the array index for the specified description ID.

Parameters:id (DescID) – The description ID.
Return type:long
Returns:The retrieved array index.
MoData.GetDataInstance(id)

Get a pointer to the container for the specified array.

Parameters:id (DescID) – The description ID of the array.
Return type:BaseContainer
Returns:The internal container.
MoData.GetDataIndexInstance(index)

Get a pointer to the container for the specified array.

Parameters:index (int) – The index of the array.
Raises IndexError:
 If the array index is out of range : 0<=index<GetArrayCount().
Return type:BaseContainer
Returns:The internal container.
MoData.GetData([id=NOTOK])

Get a copy of the array’s container.

Parameters:id (int) –

The ID of the array:

MODATA_MATRIX Matrix Matrix of the clone.
MODATA_COLOR Vector Color of the clone.
MODATA_SIZE Vector Size of the clone.
MODATA_UVW Vector UV position of the clone.
MODATA_FLAGS long Flags:
MOGENFLAG_CLONE_ON Particle is visible.
MOGENFLAG_DISABLE Particle is permanently disabled.
MOGENFLAG_BORN Particle is just generated (internal use only).
MOGENFLAG_MODATASET The MoData has been set and doesn’t need the input of the transform panel.
MOGENFLAG_COLORSET The MoData color has been set and doesn’t need to be updated.
MOGENFLAG_TIMESET The MoData time has been set and doesn’t need to be updated.
MODATA_WEIGHT float Weight of the clone.
MODATA_CLONE float Clone Offset (picks which child of the Cloner gets cloned or the blending between those children).
MODATA_TIME float Time offset of the clone.
MODATA_LASTMAT Matrix Previous frame particle matrix.
MODATA_STARTMAT Matrix Matrix at the particle’s birth.
MODATA_ALT_INDEX long Alternative index value that can be used for instance by the Step Effector when cloned over a spline with an offset.
MODATA_FALLOFF_WGT float Falloff weight.
MODATA_SPLINE_SEGMENT long The segment index, mostly used with the MoSpline (currently unused).
MODATA_GROWTH float Offset of growth for the particle on the MoSpline (currently unused).
Return type:BaseContainer
Returns:The array’s container.
MoData.AddArray(id[, name=""][, default_flags=0])

Add the specified array.

Parameters:
  • id (DescID) – The description ID of the array.
  • name (str) – The name of the array.
  • default_flags (int) –

    Default flags:

    MOGENFLAG_CLONE_ON Particle is visible.
    MOGENFLAG_DISABLE Particle is permanently disabled.
    MOGENFLAG_BORN Particle is just generated (INTERNAL USE ONLY).
    MOGENFLAG_MODATASET The MoData has been set and doesn’t need the input of the transform panel.
    MOGENFLAG_COLORSET The MoData color has been set and doesn’t need to be updated.
    MOGENFLAG_TIMESET The MoData time has been set and doesn’t need to be updated.
Return type:

int

Returns:

The index of the added array or NOTOK if it failed.

MoData.RemoveArray(id)

Remove the specified array.

Parameters:id (DescID) – The description ID of the array.
Return type:bool
Returns:True if the array has been removed, otherwise False.
MoData.SetName(id, name)

Set the name for the specified array.

Parameters:
  • id (DescID) – The description ID of the array.
  • name (str) – The new name of the array.
MoData.GetName(id)

Get the name of the specified array.

Parameters:id (DescID) – The description ID of the array.
Return type:str
Returns:The name of the array.
MoData.SetIndexName(index, name)

Set the name for the specified array.

Parameters:
  • index (int) – The index of the array.
  • name (str) – The new name of the array.
Raises IndexError:
 

If the array index is out of range : 0<=index<GetArrayCount().

MoData.GetIndexName(index)

Get the name of the specified array.

Parameters:index (int) – Array index.
Raises IndexError:
 If the array index is out of range : 0<=index<GetArrayCount().
Return type:str
Returns:The name of the array.
MoData.GetArray(id)

Get an array.

Parameters:id (int) –

The ID of the array:

MODATA_MATRIX Matrix Matrix of the clone.
MODATA_COLOR Vector Color of the clone.
MODATA_SIZE Vector Size of the clone.
MODATA_UVW Vector UV position of the clone.
MODATA_FLAGS long Flags:
MOGENFLAG_CLONE_ON Particle is visible.
MOGENFLAG_DISABLE Particle is permanently disabled.
MOGENFLAG_BORN Particle is just generated (internal use only).
MOGENFLAG_MODATASET The MoData has been set and doesn’t need the input of the transform panel.
MOGENFLAG_COLORSET The MoData color has been set and doesn’t need to be updated.
MOGENFLAG_TIMESET The MoData time has been set and doesn’t need to be updated.
MODATA_WEIGHT float Weight of the clone.
MODATA_CLONE float Clone Offset (picks which child of the Cloner gets cloned or the blending between those children).
MODATA_TIME float Time offset of the clone.
MODATA_LASTMAT Matrix Previous frame particle matrix.
MODATA_STARTMAT Matrix Matrix at the particle’s birth.
MODATA_ALT_INDEX long Alternative index value that can be used for instance by the Step Effector when cloned over a spline with an offset.
MODATA_FALLOFF_WGT float Falloff weight.
MODATA_SPLINE_SEGMENT long The segment index, mostly used with the MoSpline (currently unused).
MODATA_GROWTH float Offset of growth for the particle on the MoSpline (currently unused).
Return type:list
Returns:The array.
MoData.SetArray(id, arr, apply_strength)

Set an array.

Parameters:
  • id (int) –

    The ID of the array:

    MODATA_MATRIX Matrix Matrix of the clone.
    MODATA_COLOR Vector Color of the clone.
    MODATA_SIZE Vector Size of the clone.
    MODATA_UVW Vector UV position of the clone.
    MODATA_FLAGS long Flags:
    MOGENFLAG_CLONE_ON Particle is visible.
    MOGENFLAG_DISABLE Particle is permanently disabled.
    MOGENFLAG_BORN Particle is just generated (internal use only).
    MOGENFLAG_MODATASET The MoData has been set and doesn’t need the input of the transform panel.
    MOGENFLAG_COLORSET The MoData color has been set and doesn’t need to be updated.
    MOGENFLAG_TIMESET The MoData time has been set and doesn’t need to be updated.
    MODATA_WEIGHT float Weight of the clone.
    MODATA_CLONE float Clone Offset (picks which child of the Cloner gets cloned or the blending between those children).
    MODATA_TIME float Time offset of the clone.
    MODATA_LASTMAT Matrix Previous frame particle matrix.
    MODATA_STARTMAT Matrix Matrix at the particle’s birth.
    MODATA_ALT_INDEX long Alternative index value that can be used for instance by the Step Effector when cloned over a spline with an offset.
    MODATA_FALLOFF_WGT float Falloff weight.
    MODATA_SPLINE_SEGMENT long The segment index, mostly used with the MoSpline (currently unused).
    MODATA_GROWTH float Offset of growth for the particle on the MoSpline (currently unused).
  • arr (list) – The array.
  • apply_strength (bool) – If True, a falloff must be present in the MoData instance
MoData.Flush()

Flushes the data. All data is cleared, the arrays are freed.

MoData.SetOffset([offset=0])

Set an offset from the beginning of the arrays, for example array[0] becomes array[offset].

Parameters:offset (int) – The array offset, 0 <= offset < GetCount().
MoData.SetLimit([limit=NOTOK])

Limits the array. All data are kept internally. Can be useful for certain cases for instance merging.

Parameters:limit (int) – The array limit, 0 <= limit < GetCount().
MoData.GetGenerator()

New in version R14.014.

Returns the generator.

Note

In a Python Effector the variable gen is the generator.

Return type:BaseList2D
Returns:The generator.
MoData.GetFalloffs()

Returns the established falloffs.

Return type:list of float
Returns:The falloff samples.
MoData.GetCurrentIndex()

Returns the current index.

Return type:int
Returns:The current index.
MoData.GetBlendID()

Returns the current blend ID.

Return type:int
Returns:The current blend ID.

Table Of Contents