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

    Check if an item in INCLUDE list was selected

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 614 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.
    • H Offline
      Helper
      last edited by

      On 06/05/2016 at 12:57, xxxxxxxx wrote:

      I'm writing a plugin whose interface has an INCLUDE list.
      When I simply click in an item in the list, I get no event in the Message method.
      Clicking the items in the list doesn't trigger an event?
      How can I react to the user simply clicking an item in the INCLUDE list?

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

        On 06/05/2016 at 15:57, xxxxxxxx wrote:

        Maybe I could store the value from InExcludeData.GetFlags(index), and check if it changed, from within a Timer.
        But is it possible to assign a Timer to a tag layout that is loaded from a .res file?
        If not, I may need to create a layout inside the tag.
        Is there any framework for a tag that shows how to create a layout without using a .res file?

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

          On 09/05/2016 at 01:27, xxxxxxxx wrote:

          Hello,

          you can set the flag SEND_SELCHNGMSG in the description of your IN_EXCLUDE list. If the value of this flag is set to 1 the parameter will send MSG_DESCRIPTION_POSTSETPARAMETER to the tag's Message() function when the selection is changed.

            
          IN_EXCLUDE  INEXPARAMETER { SEND_SELCHNGMSG 1; }  
          

          Best wishes,
          Sebastian

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

            On 09/05/2016 at 05:21, xxxxxxxx wrote:

            GREAT!!!
            I can now check that a new item in the list was clicked.
            But, how can I check which one?
            The SDK tells me that when I get a MSG_DESCRIPTION_POSTSETPARAMETER message, the corresponding data is in DescriptionPostSetValue but when I print the data variable, I always get None.

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

              On 09/05/2016 at 06:37, xxxxxxxx wrote:

              Also, the InExcludeData.GetFlags(index) is always returning 0 (zero)
              Isn't there any way to detect which item is selected?

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

                On 09/05/2016 at 08:53, xxxxxxxx wrote:

                Hello,

                GetFlags() returns the bit field that stores the states of the optional boolean values, not the state if the element is selected in the GUI element.

                It seems that there is no way to retrieve the information if a certain element is selected in an InExclude GUI element.

                Best wishes,
                Sebastian

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

                  On 09/05/2016 at 09:04, xxxxxxxx wrote:

                  Oh, damn!!!
                  Thank you, Sebastian.
                  I guess I will have to get inventive.

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