THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/06/2005 at 13:31, xxxxxxxx wrote:
Cinema 4D Version: 7.3/8.5
Platform: Windows ;
Language(s) : C++ ;
I just got out of bed so maybe this will clear itself up as I wake up some, but here's what I want to do...
1. get pointer to active (polygon) object
2. make a clone of that object
3. walk the list of tags on the clone, while...
4. potentially adding additional tags to the original
5. free the clone when done.
...I don't want to be adding tags to the original, while I'm in a loop walking down the list of tags - which is the (only) reason for the clone. I have no problems with the code involved in steps 1,3 or 4... my question revolves around making and freeing the clone. The clone will need to have copies of all the tags off the original, as well as access to the vertices of the original polygon object.
So... it looks like the base class of the PolygonObject class (C4DAtom) has a 'GetClone()' routine, but it's unclear to me at this point how I'd go about freeing the cloned object if I use that (?).
Alternatively, the PolygonObject itself has a Alloc() and Free() functions which would create/free a new one and presumably there's a CopyTo() somewhere (?) n the class tree that I could use to clone the original... but in this case, it's unclear to me if/whether all the tags would get copied as well.
Could anyone clarify this for me?