Hi,
I need alternative to GetCache(), and CSTO seems to be a good option.
But Python tag produces wrong geometry when executed over clone of the object with CSTO.
It additionally produces geometry which should be hidden by parent generators (for ex. Cloner under Volume Builder).
Behavior is the same in Python Expression, or Python Tag Plugin, and it affects Cinema4D R21+ at the least.
Here's the code:
srcClone = srcObj.GetClone(c4d.COPYFLAGS_NO_ANIMATION)
doc.InsertObject(srcClone)
cstoResult = c4d.utils.SendModelingCommand(
command=c4d.MCOMMAND_CURRENTSTATETOOBJECT,
list = [srcClone],
mode = c4d.MODELINGCOMMANDMODE_ALL,
bc = c4d.BaseContainer(),
doc = doc
)
srcClone.Remove()
for resObj in cstoResult:
for resChildObj in HierarchyIterator(resObj.GetDown()):
cloneObject = resChildObj.GetClone(c4d.COPYFLAGS_NO_HIERARCHY)
cloneObject.InsertUnderLast(selfObj)
Viewport:
Don't like the idea to call CSTO over original object, because it rebuilds object cache and affect DIRTYFLAGS_CACHE.
What's the issue, is it possible to resolve it?
Plugin https://www.dropbox.com/s/fxz8g7p8uuwc5y0/c4d_tag_csto.zip?dl=0
Scene simple csto test.c4d
Thanks.