THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/11/2010 at 08:16, xxxxxxxx wrote:
Originally posted by xxxxxxxx
<ADDRESS>
I have some questions about this option:Edit -> Preferences -> Files -> Save Polygons for Melange
Does this option perform the same action as doc->Polygonize() ?If it works like Polygonize(), then does that mean I don't have to call Polygonize() if this optionis checked?
no, this option means that the polygon caches for all objects will be written to the document too.
Can I use the C++ SDK to determine if this option is checked? If so, how?
BaseContainer *bc = GetWorldContainerInstance();
GeData ddd;
if (bc->GetParameter(WPREF_SAVE_CACHES, ddd))
{
Bool melangeSaveFlag = ddd.GetLong();
}
Does this option add additional data to the document, or does it convert the entire document into polygons?If it adds additional data, how do I access it?
it's adding already existing polygon data. the scene will remain untouched. accessing it is kind of complex (there's a deform cache and geometry cache).
i would recommend that you use the import functionality the commandline example shows. you have to overload the Execute() functions at every object, then you will be called for each object and you can translate it into your object data. you can return true, which means you could "understand" the data and the object is done. in case you can't translate a complex object (e.g. symmetrie object) to one of yours, just return FALSE and you will get a other call of the same object but with simpler data.
e.g. you don't have some kind of primitive (e.g. torus) in your application, return FALSE in AlienPrimitiveObjectData::Execute() and you will get a call in AlienPolygonObjectData::Execute() which represents the same objects only through polygons.
This is what I trying to do:I have "Save Polygons for Melange" checked.I create a simple cube primitive.I then export the scene, however, there is only one object in my scene, a "Ocube" primitive.I don't see any polygons.
I also try calling doc->Polygonize(), but I still don't see any polygons.Where exactly are my polygons?
because it's the cache for each object and this should no be visible.
Or maybe I totally misunderstand the purpose of this option.Is this data only accessible through the Melange library? Can the C++ SDK access it too?
[/QUOTE]
you can access it with this:
BaseObject* GetCache(HierarchyHelp* hh = NULL);
BaseObject* GetDeformCache(void);
these functions are available in cinema sdk and melange sdk.
if you want to use these functions or you just want to know more, please compile the cinema sdk example "ActiveObject" and start it. it' like an enhanced object manager and will show you how the objects and caches are stored in cinema.
jens