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

    Set the parent of an object in the Object Manager

    SDK Help
    0
    2
    300
    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

      On 13/05/2017 at 20:27, xxxxxxxx wrote:

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

      ---------
      Hello,

      It's been a while since I have tinkered with the C4D SDK.  I have a TagData plugin and I would like to move the object associated with this tag as a child of another tag that I added to the document.  Could someone please refresh my memory as to how this is accomplished.  I have searched a lot of the forums here and haven't found an answer.

      Cheers!

      Shawn

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

        On 15/05/2017 at 09:08, xxxxxxxx wrote:

        Hi Shawn,

        welcome to the Plugin Café forums 🙂

        I'm afraid you will have to take a different approach. You are not allowed to modify the scene graph from within a tag's Execute() function.

        I'd suggest to implement a button for this action, so when the button gets pressed, you will end up in the Message() function (MSG_DESCRIPTION_COMMAND) of your TagData plugin and in there you can easily change the hierarchy as needed. Just see GetNext(), GetDown(), GetPred(), GetUp() and the Insert..() functions of GeListNode and remember that no entity must/can be part multiple list at any one time, so you will also have to use Remove() before inserting somewhere else.

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