THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/05/2006 at 05:47, xxxxxxxx wrote:
Cinema 4D Version: 9.5
Platform: Windows ; Mac ;
Language(s) : C++ ;
I tried to merge a scene into the currently active document and MergeDocument returns TRUE, but nothing is merged into the scene.
Anybody knows how to use MergeDocument() or why it´s not workign?
BaseDocument *doc=GetActiveDocument(); if (!doc) return FALSE;
On 16/05/2006 at 00:47, xxxxxxxx wrote:
So, doesn´t it work or am I doing sth wrong?
How is one supposed to develop when you need to beg for an answer?
On 16/05/2006 at 06:35, xxxxxxxx wrote:
MergeDocument() is new to the R9.5 SDK, so I've never used it. You're probably one of the first to do so.
What you're doing looks proper from reading the documentation. Does the loaded document show anywhere (unmerged, for instance) or does it just not load at all?
On 16/05/2006 at 06:41, xxxxxxxx wrote:
it simply doesn´t load at all. I don´t get any memory leaks but the function returns TRUE! It really seems to do nothing!
On 16/05/2006 at 08:22, xxxxxxxx wrote:
What kind of document is it? A .c4d I would suppose. Have you tried other files and file types, .obj for instance?
Looking at 'c4d_basedocument.cpp', it appears that SCENEFILTER_MERGESCENE is already OR'd into the flags. Try it without any flags (0L), if you haven't already.
On 16/05/2006 at 08:50, xxxxxxxx wrote:
yep, it is c4d. Also tried other formats. And I of course already tried any kind of FLAG combination already. No difference though.
On 16/05/2006 at 13:29, xxxxxxxx wrote:
I'm sorry, the docs are a bit misleading. In my experiments I need to have SCENEFILTER_OBJECTS|SCENEFILTER_MATERIALS in order to make both LoadDocument() and MergeDocument() actually do anything. This is the code I used:
BaseDocument* doc1 = LoadDocument(fn1, SCENEFILTER_OBJECTS|SCENEFILTER_MATERIALS, NULL);
On 16/05/2006 at 13:33, xxxxxxxx wrote:
Thanks Mikael! Now I see what LoadDocument has to do with it! Great, will try that. Thanks finally!
On 14/06/2009 at 11:50, xxxxxxxx wrote:
Just found this solution, but i'd like to understand why i need to use LoadDocument and cant use the current ActiveDocument as the base?