Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    MergeDocument()

    Scheduled Pinned Locked Moved SDK Help
    9 Posts 0 Posters 704 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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);
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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! 😞

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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. 😞

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  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();
                  
                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Helper
                    last edited by

                    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!

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      Helper
                      last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post