PDA

View Full Version : Python GEN confusion


deepshade
02-04-2012, 12:56 PM
Basically, 'gen' is the name of a variable (referencing the cloner or generator object) added to the execution of main() function in a Python effector, just as the same as 'doc' (document where the effector resides) and 'op' (effector) variables:

import c4d
from c4d.modules import mograph as mo
#Welcome to the world of Python

def main():
md = mo.GeGetMoData(op)
if md==None: return 1.0

# Print variables added to the scope of main()
print op
print gen
print doc

index = md.GetCurrentIndex()
mode = md.GetBlendID()
if mode==c4d.ID_MG_BASEEFFECTOR_POSITION:
return c4d.Vector(0.5)
else: return 1.0



Why
When the python effector is set to Full Control
does GEN return the Cloner

and
when the python effector is set to Parameter Control
does GEN return the Cloner Object Link
???

deepshade
02-10-2012, 07:06 PM
or to put it another way
is the variable GEN in parameter mode
returned incorrectly ie a bug

CGTalk Moderation
02-10-2012, 07:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.