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

    How to get the activated objects in the IN/EXCLUDE GUI?

    Cinema 4D SDK
    r19 python
    3
    9
    1.7k
    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.
    • chuanzhenC
      chuanzhen
      last edited by

      I searched a lot in the forum and still couldn't find the answer. But in c4d, the right-clicked the activated object in the gui can select or remove the activated object . Obviously it should have a way to get the activated object.

      Thanks for any help.

      0_1546922705214_未标题-1.png

      相信我,可以的!

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by

        Here you go: https://developers.maxon.net/docs/py/2023_2/modules/c4d/CustomDataType/InExcludeData/index.html?highlight=inexcludedata

        You can also find practical examples in the SDK examples.

        1 Reply Last reply Reply Quote 1
        • M
          m_adam
          last edited by m_adam

          Hi, @chuanzhen I'm afraid it's not possible to know the current selection state.

          InExclude.GetFlags actually return the enabling state (e.g in the Fracture object, in the Effectors tab, drag an effector into the InExclude fields, and GetFlags return the enabling state of the effector).

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          chuanzhenC 1 Reply Last reply Reply Quote 2
          • chuanzhenC
            chuanzhen @m_adam
            last edited by chuanzhen

            @m_adam Thanks,I still have a question about c4d how to implement the "Select Object(s)/Remove" command in IN/ExcludeGUI,this confuses me!

            相信我,可以的!

            1 Reply Last reply Reply Quote 0
            • M
              m_adam
              last edited by m_adam

              Hi @chuanzhen, if you try to create a command which Selects the object and Remove this is not possible.
              The internal parameter which store the selection is not exposed, and the message sent to the description to notify a selection change, do not contains information about ID.

              So I'm afraid it's a limitation, I will fill a feature request.
              Cheers,
              Maxime.

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

              chuanzhenC 1 Reply Last reply Reply Quote 1
              • chuanzhenC
                chuanzhen @m_adam
                last edited by

                @m_adam Thanks,although the problem has not been resolved, but got a good answer.

                Thanks also for the help provided by @mp5gosu ☺

                相信我,可以的!

                1 Reply Last reply Reply Quote 0
                • M
                  mp5gosu
                  last edited by

                  Another way would be to create your own CustomGui. This however may be a bit over the top and there's way more to implement. It may pay off for you though.

                  chuanzhenC 1 Reply Last reply Reply Quote 1
                  • chuanzhenC
                    chuanzhen @mp5gosu
                    last edited by

                    @mp5gosu Thanks, I will keep exploring that creating my own CustomGui. The greatest pleasure is the process of finding answers.☺

                    相信我,可以的!

                    1 Reply Last reply Reply Quote 0
                    • M
                      m_adam
                      last edited by m_adam

                      @mp5gosu, that's true I didn't think about this possibility as well.

                      Just for your information, an IcustomGui can only be done with C++ an implementation example can be found in customdata_customgui.cpp.

                      Cheers,
                      Maxime.

                      MAXON SDK Specialist

                      Development Blog, MAXON Registered Developer

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