The Python Effector is used to create custom Effector for a MoGraph object. It can be found in the MoGraph -> Effector menu.
The Python Effector is implemented through an EffectorData which is not available in Python. Take a look in the C++ doc for more information. The Python Effector offers two modes to execute code:
Parameter Control: called for each clone.
Full Control: called only one time to handle all clones at once.
The Python Effector should not create/modify objects in the scene.
The important Threading Information.
# This code is used in a Python Effector import c4d def main(): md = c4d.modules.mograph.GeGetMoData(op) if md is None: return 1.0 # Generator object, same as c4d.modules.mograph.GetGenerator() print(gen) # Other variables are also available in a Python effector print(doc) # Document where the effector is located print(op) # Effector object return 1.0
Override - Mandatory method, used to set MoGraph data through
c4d.modules.mograph. It can be called multiple time per frame.