Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Making an Object Instance

    SDK Help
    0
    3
    223
    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 10/05/2004 at 05:17, xxxxxxxx wrote:

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

      ---------
      This is a simple question, but I could not find documentation for it.

      With the C++ SDK, how do you create an instance of a BaseObject? I looked at the posts here on making a clone, but it appears that a clone is a copy, not an instance.

      I can allocate an instance with:
      BaseObject* ob = Alloc(Oinstance);

      But then how does one set the source object for this instance object?

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

        Please see Oinstance.res. In there you'll find that

            
            
            AutoAlloc<BaseLink> link;  
            if (link)  
            {  
              link->SetLink(anotherobj);  
              ob->SetParameter(DescLevel(INSTANCEOBJECT_LINK), GeData(link), 0);   
            }
        

        does the trick.

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

          Thanks Mickael!

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