c4d.modules.mograph

Follow me to the Inheritance diagramm .

Types

Functions

GetGenerator()

To get the generator (cloner, matrix object, text object, instance object, fracture object) that owns the MoData currently being modified in a Python effector, a global variable ‘gen’ is added to the effector code:

import c4d
from c4d.modules import mograph as mo
def main():
  md = mo.GeGetMoData(op)
  if md==None: return 1.0
  print gen   # Generator object
  # Other variables are also available in a Python effector
  print doc   # Document where the effector is located
  print op    # Effector object
  return 1.0
					
c4d.modules.mograph. GeGetMoData ( op )

Returns the MoGraph data of an object.

Parameters: op ( c4d.BaseObject ) – The object.
Return type: MoData
Returns: The MoGraph data.
c4d.modules.mograph. GeGetMoDataSelection ( op )

New in version R18.020.

Retrieves the MoGraph clones selection.

Parameters: op ( c4d.BaseList2D ) – Can be either a MoGraph Selection tag or an object with a MoGraph Selection tag.
Return type: c4d.BaseSelect
Returns: The clones selection.
c4d.modules.mograph. GeSetMoDataSelection ( op , selection )

New in version R18.039.

Sets the MoGraph clones selection.

Parameters:
  • op ( c4d.BaseList2D ) – Can be either a MoGraph Selection tag or an object with a MoGraph Selection tag.
  • selection ( c4d.BaseSelect ) – The clones selection to set.
Return type:

bool

Returns:

True if successful, otherwise False .

c4d.modules.mograph. GeGetMoDataWeights ( op )

New in version R18.020.

Retrieves the MoGraph clones weights.

Parameters: op ( c4d.BaseList2D ) – Can be either a MoGraph Weightmap tag or an object with a MoGraph Weightmap tag.
Return type: list of float
Returns: The clones weights.
c4d.modules.mograph. GeSetMoDataWeights ( op , weights )

New in version R18.039.

Sets the MoGraph clones weights.

Parameters:
  • op ( c4d.BaseList2D ) – Can be either a MoGraph Selection tag or an object with a MoGraph Selection tag.
  • weights ( list of float ) – The clones weights to set.
Return type:

bool

Returns:

True if successful, otherwise False .

c4d.modules.mograph. GetMoDataDefault ( id )

Get the default value for the specified MoData ID.

Parameters: id ( int ) –

The MoData 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).
Return type: any
Returns: The default value.
c4d.modules.mograph. GetMoDataDefaultType ( id )

Get the default value for the specified MoData ID.

Parameters: id ( int ) –

The MoData 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).
Return type: int
Returns: The default type:
MD_NONE None.
MD_CHAR char type.
MD_UCHAR unsigned char type.
MD_LONG long type.
MD_ULONG unsigned long type.
MD_LLONG long long type.
MD_MATRIX Matrix type.
MD_COLOR Vector type.
MD_VECTOR Vector type.
MD_NORMAL Normal type.
MD_REAL float type.
MD_BOOL bool type.

Table Of Contents