MergeDocument()



  • 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:

    User Information:
    Cinema 4D Version:   9.5 
    Platform:   Windows  ; Mac  ;  
    Language(s) :     C++  ;

    ---------
    Hi,

    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;  
                   MergeDocument(doc,this->file,SCENEFILTER_MERGESCENE,NULL);
    


  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/05/2006 at 06:41, xxxxxxxx wrote:

    Hi Kuro,

    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! :-(



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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. :-(



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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:

        
        
        Filename fn1;  
        fn1.FileSelect();  
        BaseDocument* doc1 = LoadDocument(fn1, SCENEFILTER_OBJECTS|SCENEFILTER_MATERIALS, NULL);  
        Filename fn2;  
        fn2.FileSelect();  
        MergeDocument(doc1,fn2, SCENEFILTER_OBJECTS|SCENEFILTER_MATERIALS,NULL);  
        InsertBaseDocument(doc1);  
        EventAdd();
    


  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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!



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    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?

    cheers,
    Ello


Log in to reply