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

    Aliastranslator...

    SDK Help
    0
    8
    797
    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
      Helper
      last edited by

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

      On 13/06/2003 at 05:36, xxxxxxxx wrote:

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

      ---------
      I want to copy an object to another document.
      So I set up an aliastranslator, clone the object and insert it into the new document.
      The object has a materialtag on it, so I am getting a clone of the material too and copy it to the other document (also here I am using the aliastranslator). But the link to the material is broken in the new document although the material is in that new document!
      How can I copy an object without breaking the link to the material? :
      Thanks

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

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

        On 13/06/2003 at 10:17, xxxxxxxx wrote:

        Did you tell the AliasTransl object to translate the aliases with the Translate() function? (This function should be called after all copying is finished.)

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

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

          On 13/06/2003 at 10:18, xxxxxxxx wrote:

          I should also say that whenever you are passed an AliasTrans from C4D you normally don't have to call Translate() yourself, since C4D will eventually do it for you. But when you're cloning something manually you have to do it.

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

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

            On 13/06/2003 at 12:33, xxxxxxxx wrote:

            Hi Mikael,
            Cool! I did Translate them but I have translated the materials after cloning them and then again the objects and that was the mistake. Now I am doing it after the whole clone stuff and it´s working just fine 🙂
            Thanks for the quick reply!

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

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

              On 13/06/2003 at 12:51, xxxxxxxx wrote:

              Öhm another question. When using AtomArra::CopyTo, ísn´t there an AliasTrans necessary?
              Thanks

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

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

                On 14/06/2003 at 00:49, xxxxxxxx wrote:

                AtomArray is just a stupid list of pointers. The actual atoms aren't copied. So no translator is necessary.

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

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

                  On 02/11/2004 at 03:18, xxxxxxxx wrote:

                  I have the same problem. What is wrong with my code?

                    
                       AutoAlloc<AliasTrans> trans;  
                       if (!trans)  
                            return FALSE;  
                       if (!trans->Init(doc))  
                            return FALSE;  
                    
                       BaseMaterial *material = merge->GetFirstMaterial();  
                       while(material!=NULL){  
                            doc->InsertMaterial((BaseMaterial* ) material->GetClone(0,trans), NULL);  
                            material = material->GetNext();  
                       }  
                    
                       BaseObject *copy = (BaseObject* ) obj->GetClone(0,trans);  
                    
                       doc->InsertObject(copy,NULL,NULL,TRUE);  
                    
                       trans->Translate(TRUE);  
                    
                  
                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

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

                    On 02/11/2004 at 04:05, xxxxxxxx wrote:

                    I have found my mistake. AliasTrans.Init must be called with the old Document (trans->Init(merge))

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