THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2007 at 05:44, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
---------
Hello,
I need your help converting any object to a polygon object. I've searched the forum, but haven't found a solution concerning this specific problem.
My current workflow: first i'm using
> _
SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, doc, obj, bc, MODIFY_ALL);
\> pobj = doc- >GetActiveObject();
_
to convert the object to polygons. Then i joined the resulting object with all it's possible child objects, because the 'currentstatetoobject' from i.e. an ExtrudeNURBS produces childs (i.e. Extrude Nurbs, Cap1, Cap2).
But it's not that easy:
> _
SendModelingCommand(MCOMMAND_JOIN, doc, pobj, bc, MODIFY_ALL);
\> robj = doc- >GetActiveObject();
_
joints all polygon objects in the document, even below the selected pobj and not only in the hierarchy.
That's why i created a temporary NullObject, moved the polygon object pobj in there and used SendModelingCommand: MCOMMAND_JOIN on that NullObject. This fixed joining other objects in the document, but leads to troubles with the original start object's global matrix. To again, correct this, i first have to set the matrix of the Null-Object ...
... but ... is this an easy and elegant way to solve my task?!
Abstract: while keeping position, orientation etc (global matrix), i'd like to convert any object (cube, ExtrudeNurbs etc.) to a single polygon object...
Regards,
Mark.