SceneLoader plugin not setting timeline
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/02/2009 at 15:27, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.010
Platform:
Language(s) : C++ ;---------
My SceneLoader::Load method looks like this:>
\> LONG GTOSceneLoader::Load(PluginSceneLoader \*node, const Filename &name;, BaseDocument \*doc, LONG filterflags, String \*error, BaseThread \*bt) \> { \> \> if (camera) \> { \> // Lots of code to that creates a C4D camera from GTO file \> \> BaseTime tMin(m_start_frame, 24); \> BaseTime tMax(m_start_frame+m_num_frames, 24); \> \> doc->SetFps(24); \> doc->SetMaxTime(tMax); \> doc->SetMinTime(tMin); \> doc->SetTime(tMin); \> doc->Message(MSG_UPDATE); \> EventAdd(EVENT_ANIMATE); \> } \> else \> { \> // Lots of code to that creates non-camera C4D objects from GTO file \> } \> \> return FILEERROR_NONE; \> } \>
If a user opens the camera, then merges in the geometry (two separate files, so the Load method is invoked two separate times), the timeline is properly set.
However, if the user first opens the geometry, then merges the camera, the timeline is not properly set.
Can anyone tell me why?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/02/2009 at 01:23, xxxxxxxx wrote:
You have to set the PLUGINFLAG_SCENELOADER_MERGEORIGINAL flag in RegisterSceneLoaderPlugin() to modify an existing document upon merging, otherwise an empty document is passed to SceneLoaderData::Load().
cheers,
Matthias