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

    Getting a reference to a linked object

    SDK Help
    0
    2
    199
    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 25/07/2007 at 12:01, xxxxxxxx wrote:

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

      ---------
      Hi again,
      I'm working on a ObjectData plugin where I have a link to a polygon object.

      I get access to the object when I receive the message: MSG_DESCRIPTION_CHECKDRAGANDDROP on the link field.

      I can get floats with
      <CODE>
      BaseContainer *data = op->GetDataInstance();
      Real rad = data->GetReal(AIMAPOBJECT_RAD);
      </CODE>

      so the question is how do I go about getting a reference to the object in the Link field which id is INSTANCEOBJECT_LINK?

      I looked in the ObjectData and all the super classes, but can't find the method that would do the job 😞

      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 25/07/2007 at 12:44, xxxxxxxx wrote:

        If the link is a static description resource on your plugin object, then all you need do it this:

        BaseContainer* data = op->GetDataInstance();  
        BaseObject* linkOp = data->GetObjectLink(INSTANCEOBJECT_LINK, op->GetDocument());
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post