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
    • Recent
    • Tags
    • Users
    • Login

    Insert Object with Materials into Scene

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 373 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 26/02/2010 at 10:34, xxxxxxxx wrote:

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

      ---------
      Hi,

      I have created a template object with materials in a C4D file. Through a command plugin, I now want to insert this object at a given position in a second scene.

      If I do

        
      MergeDocument(doc, objectFile, SCENEFILTER_OBJECTS, NULL);   
      

      I end up with the only the object in my scene, but not the materials.
      If I use

        
      MergeDocument(doc, objectFile, SCENEFILTER_MATERIALS, NULL);   
      

      before, then I have both the materials and the objects, but the object tag is no longer linked to the material.

      By the way, using

        
      MergeDocument(doc, objectFile, SCENEFILTER_MERGESCENE, NULL);   
      

      results in nothing inserted at all.
      What am I doing wrong here?

      Thanks, Juergen

      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 28/02/2010 at 22:31, xxxxxxxx wrote:

        try this
        MergeDocument(doc, objectFile, SCENEFILTER_MATERIALS | SCENEFILTER_OBJECTS, 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 01/03/2010 at 05:57, xxxxxxxx wrote:

          Thanks affa!
          That works, but know I have the material twice in the new scene ... very strange.

          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 01/03/2010 at 06:02, xxxxxxxx wrote:

            My mistake .. the second one was a residual code part that loaded the material again seperately. So it now works perfectly!

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