Polygon and Object Caches

For each supported parametric object an alien object data class has to be defined and allocated in AllocAlienObjectData(). Also the NodeData::Execute() or BaseObject::Execute() function must be overloaded.
If false is returned in Execute() the load operation will go one level deeper to the next cache. No polygonal cache is given if true is returned in Execute().

BaseDocument::CreateSceneFromC4D() must be called first. This will invoke the calls of the overriden Execute() functions.

For an example of dealing with parameteric objects and polygon caches, see commandline example and AlienBoolObjectData::Execute() / AlienNullObjectData::Execute() implementations.

Polygonal caches for generators are only available if the "Save Polygons for Cineware" preference was enabled prior saving the file from Cinema 4D or if "Save Project for Cineware" was used.

The options "Save Polygons for Cineware" and "Save Animation for Cineware" are located into the "Files" preferences:

The options "Save Polygons for Cineware" and "Save Animation for Cineware" are always turned on when using "Save Project for Cineware". Both preferences are meant for "Save"/"Save As" operations:

  • "Save Polygons for Cineware" tells Cinema 4D to write polygonal caches for generators (parametric primitives, Spline Generators such as the Extrude object, Cloner objects etc.).
  • "Save Animation for Cineware" ensures that all clones for the animation (and not only those in the current animation frame) are saved. This is useful, if for example, the number of clones is animated for Cloner objects, or any other objects that can change the number of clones, including the Array object or many other MoGraph objects.

Note both preferences can significantly increase the file size depending on the complexity of the scene.

See also
Implementation and Implementation on the External Side.