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

    ActiveObjectManager_SetObject gets overruled by Xpresso tag

    Cinema 4D SDK
    c++ r19 r20 r21
    2
    4
    814
    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.
    • C4DSC
      C4DS
      last edited by

      Hi,
      I am creating a GeUserArea, SceneHook and multiple NodeData derived objects. Each NodeData derived object represents a custom tool I am providing to interact with my GeUserArea. Since each custom tool allows for parameters to be set, I also have registered a description for each nodedata. Each custom tool gets activated by a CommandData.

      When the user selects a CommandData, this will "activate" the corresponding NodeData, which perform a:

      ActiveObjectManager_SetObject(ACTIVEOBJECTMODE::NODE, nodedata, ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN);
      

      With this all parameters available in the description are available in the Attribute Manager.

      This all works fine, except when an Xpresso tag is present in the scene.
      In that case, when the user selects a custom tool, the tool's description is shown in the Attribute Manager for a split second, and directly gets replaced by the first active node in the first Xpresso tag of the scene file.

      On other occasions, the custom tools' description is left as is, but as soon as one selects an attribute, the description gets replaced by a node of the Xpresso tag.

      When no nodes are active in any Xpresso tag, then the custom tool's description is replaced by an empty pane.

      In all scenario's tested, as soon as I remove the Xpresso tag(s) all is working as expected.
      Additionally, when I save such scene file (with Xpresso included), and revert to that saved file: all is working as expected ... until I remove the existing Xpresso tag and create a new one.

      Tested with R19, R20, R21. All behave the same way.

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hi,

        I'm not sure if i really understand what you are doing, but ACTIVEOBJECTMODE::NODE is probably not the right mode you want to use in ActiveObjectManager_SetObject.

        As said in the documentation this is the Xpresso Node mode.
        I wouldn't be surprised that the problem you are facing is coming from this parameter.

        You could maybe register your own mode or use one of those (sorry, i didn't tried myself) ACTIVEOBJECTMODE::NONE, OBJECT , DUMMY

        Let me know if this solved the issue. Otherwise we will need to share some code or more explanation so i fully understand what you are trying to achieve 🙂

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • C4DSC
          C4DS
          last edited by

          Makes sense when you explain it.
          I had the idea I had to use the node mode, since I was using NodeData. But it being reserved for Xpresso nodes makes more sense. Thanks for bringing this to my attention.

          I will try using a different mode, or make my own ... and let you know.
          Thanks.

          1 Reply Last reply Reply Quote 0
          • C4DSC
            C4DS
            last edited by C4DS

            Seems the only solution here is to register an own mode.

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