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

    Copy Objects and Materials

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 275 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 16/10/2009 at 04:19, xxxxxxxx wrote:

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

      ---------
      Hi,
      for an exportplugin I am creating clones of the active document (to have all the materials in the new document too). I then delete all Objects in that new document and insert the one I want.
      After that im exporting.

      > \> BaseDocument \*temp = ( BaseDocument\* ) docMain->GetClone( COPY_DOCUMENT, NULL ); \> DeleteAllObjects( temp ); \> \> AutoAlloc<AliasTrans> aliastrans; \> aliastrans->Init( docMain ); \> temp->InsertObject( ( BaseObject\* ) obj->GetClone( 0, aliastrans ), NULL, NULL, FALSE ); \> aliastrans->Translate(TRUE); \>

      Problem are the textures on the object, they don't get linked properly. The TextureTag is there, but it doesn't have the link to the Material.

      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/10/2009 at 05:35, xxxxxxxx wrote:

        Hi,

        don´t waste time, use:

        BaseDocument* IsolateObjects(BaseDocument* doc, const AtomArray& t_objects)

        😉

        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/10/2009 at 07:29, xxxxxxxx wrote:

          Wow, thank you for the tip.

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