THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/09/2007 at 02:04, xxxxxxxx wrote:
Cinema 4D Version: 10.1
Platform: Windows ;
Language(s) : C++ ;
I'm implementing a scene exporter plugin for Ogre and everything is going fine so far. Currently I call BaseDocument::Polygonize() at the beginning of my export and just export every PolygonObject I encounter. For small scenes that's fine.
But now I've run into a problem:
In order to create an efficient output in terms of file size I would really like to support C4Ds instances, arrays and so on. So, I can't really just use the polygonized document, because all info whether that object was an instance of some other is lost there. When using the unpolygonized document I have to convert all NURBS objects for example to PolygonObjects to export them properly, just like "Functions -> Make Editable" does.
I couldn't find a fitting function in the SDK docs, so I'm asking here. It seems GetCache(...) could be what I'm looking for, but seems rather complex to work with. Would be great if somebody could give me an example of how to work with that.
Another idea I had was just using both the polygonized document and the unpolygonized one, checking the unpolygonized one for the object type and getting the polygonized object for NURBS and others from the polygonized document. Bad idea?
I just understood myself that my second idea is not too good, because some NURBS create more than one object when being converted (for example an extrude NURBS with caps creates the caps as seperate objects)
On 05/09/2007 at 07:55, xxxxxxxx wrote:
SendModelingCommand() with command MCOMMAND_MAKEEDITABLE
or MCOMMAND_CURRENTSTATETOOBJECT is what you're looking for.
On 06/09/2007 at 01:38, xxxxxxxx wrote:
Great! Thx Will give that a try. I'll have a look into SendModelingCommand() a bit further, sounds like it could be the place where I'll find out how to connect objects, too.