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
    • Register
    • Login

    How to get selected DescId and BaseList2D at the same time

    Scheduled Pinned Locked Moved Cinema 4D SDK
    c++
    1 Posts 1 Posters 10 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.
    • E Offline
      ECHekman
      last edited by ECHekman

      I found the way to get the selected DescID from the Attributes viewer (DescriptionCustomGui).
      However when viewing nested NodeDatas it is not clear to which NodeData the DescID belongs.
      For example Instance Object has a "Reference Object". Basically a linkbox. When you open it, you can select attributes in there, however it is then not clear to which NodeData this DescID belongs to: the Referenced Object, or the Instance Object itself.

      BaseContainer selection;
      RTViewer->GetDescIDSelection(selection);
      if (auto data = selection.GetIndexData(0))
      {
          DescID* desc = reinterpret_cast<DescID*>(data->GetCustomDataTypeI(CUSTOMDATATYPE_DESCID));
          // How to know which NodeData object this belongs to?
      }
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post