On 25/07/2015 at 05:28, xxxxxxxx wrote:
I've been experimenting with python and c4d to learn about it's basics, and made myself this python generator to subdivide the contained object.
However, the code continues to subdivide on each mouse movement, it keeps subdividing the end result until everything is out of memory.
What am I missing here?
import c4d
#Welcome to the world of Python
def main() :
frame=doc.GetTime().GetFrame(doc.GetFps())
child = op.GetDown()
if child is None:
return
settings = c4d.BaseContainer()
settings[c4d.MDATA_SUBDIVIDE_SUB] = 1
polyobj = op.GetAndCheckHierarchyClone(hh,child,c4d.HIERARCHYCLONEFLAGS_ASPOLY,False)["clone"]
c4d.utils.SendModelingCommand(c4d.MCOMMAND_SUBDIVIDE,[polyobj],c4d.MODIFY_ALL,settings)
return polyobj