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

    Prevent selection

    Cinema 4D SDK
    python
    2
    2
    447
    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.
    • merkvilsonM
      merkvilson
      last edited by

      Is it possible to prevent object/tag plugins from getting selected when clicking on them?

      Currently, If I click on let's say object generator plugin, it gets highlighted in the viewport, highlighted in the objects manager and its attributes manager shows on.
      I want to change the behavior, so if I have selected another non-plugin object and its attributes managers are visible I want to keep it even if I click the plugin object in the scene or the objects manager.

      i_mazlovI 1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov @merkvilson
        last edited by

        Hi @merkvilson ,

        If I understand your goal correctly, you would like to have your object/tag plugin being "unselectable" in the object manager, such that any previously selected objects would stay selected. Unfortunately, this is not directly possible. What you would like to have is the same behavior of your plugin like it was on a locked layer. There was already an adjacent discussion about this: How to hide object local coordinates.

        However, you can theoretically emulate such behavior by tracking current selection in cinema and catching the event of your plugin being selected. At this point you could "undo" the selection by unselecting your plugin and selecting back what was selected before. However, for that you would need a SceneHook, which is only available in the C++ SDK. What is more, such approach does not sound like something robust and reliable, especially when used with some 3rd party plugins that you're not aware of beforehand.

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

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