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

    Change InExclude flag icon dynamically?

    SDK Help
    0
    4
    420
    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
      Helper
      last edited by

      On 03/11/2015 at 06:33, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   16 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      I am trying to dynamically change the icon of an inexclude flag using inex->GetData(obj_index)->SetLong(IN_EXCLUDE_FLAG_IMAGE_01_ON, new_icon_id);

      However, this doesn't seem to work.
      inex->GetData(obj_index)->GetLong(IN_EXCLUDE_FLAG_IMAGE_01_ON)
      furthermore always returns 0 (even though an icon id is assigned).

      Is it possible? And if so what is the correct way of accessing this data?

      Thanks!

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

        On 03/11/2015 at 06:48, xxxxxxxx wrote:

        Could it be that IN_EXCLUDE_FLAG_IMAGE_01_ON is a description id which I can only access per Inexclude element (e.g. via GetParameterI())? Makes sense I guess.

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

          On 04/11/2015 at 01:56, xxxxxxxx wrote:

          Hello,

          a custom GUI displays the value of a parameter. But how that custom GUI looks like also depends on the parameter description. So for example a slider displays the value of a float parameter. The details of that slider are not stored with the float parameter but in the parameter description.

          The same is true for the InExclude parameter and GUI. The state of the flags is defined in the parameter itself. What icon is used for what flag is defined in the parameter description. So you can easily edit the icons used in GetDDescription() :

            
          BaseContainer* bc;  
          bc = desc->GetParameterI(DescLevel(MY_LIST), nullptr);  
          if (bc)  
          {  
           bc->SetInt32(IN_EXCLUDE_FLAG_IMAGE_01_ON, ID_LASTTOOL_START);  
          }  
          

          best wishes,
          Sebastian

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

            On 04/11/2015 at 03:11, xxxxxxxx wrote:

            Thanks Sebasitian for your answer.

            Yeah, I figured but unfortunately it's not enough for me because it will change the first icon for all entries of the according InExclude list. I was looking for a way to change that icon per entry and then noticed it won't work of course.

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