Copying / cloning a Volume Builder object.
-
I think there is a bug when cloning a Volume Builder object.
Here the hierarchy and the Volume Builder properties.
See the cloner is set to Intersect!Now I clone the volume builder with the following script.
import c4d from c4d import gui def main(): doc.InsertObject(op.GetClone()) print op.GetName() + " Inserted." c4d.EventAdd() # Execute main() if __name__=='__main__': main()
Here the resulting Volume Builder with its properties.
The cloner is now set to Union!
Is my assumption correct that this is a bug and if so, is there a solution or a workaround?
-Pim
I have attached the scene file I used.
volume builder issue.c4d -
Hi Pim, it looks like you've hit a bug here and I confirm I'm able to reproduce it on Python as well as on C++.Unfortunately at the moment, even using the VolumeBuilder.SetBoolMode() / VolumeBuilder::GetBoolMode() I've not been able to to workaround the issue.I'll keep update on the resolution.
Best, Riccardo -
Hi Pim, I've good news here since I was wrong on my previous post, so please ignore it
Actually it is necessary to translate the entries in the list to the new children that were cloned together with the generator. If that doesnโt happen, the list does not recognize the old entries, removes them and auto adds the new children with default settings. Default mix mode is Union in this case.
That said, apologizing for the wrong information, the right way to clone the VolumeBuilder is:
import c4d from c4d import gui def main(): trans = c4d.AliasTrans() if not trans or not trans.Init(doc): return False doc.InsertObject(op.GetClone(c4d.COPYFLAGS_NONE, trans)) trans.Translate(True) print op.GetName() + " Inserted." c4d.EventAdd() # Execute main() if __name__=='__main__': main()
Best, Riccardo
-
@r_gigante said in Copying / cloning a Volume Builder object.:
AliasTrans
Great news, I will try it.
Thanks.Edit: Yes, everything is ok now!
But to be honest, I do not fully understand the functionality.
The manual says "Normally Cinema 4D provides an alias translator when needed, for example in NodeData.CopyTo(). However, to copy objects manually use: ..."So, the advise is to use this functionality when copying objects?
I see the functionality is here since R17, but this is the first time I came across this issue and this solution.