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

    Dimming elements of a description

    Scheduled Pinned Locked Moved PYTHON Development
    9 Posts 0 Posters 715 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 31/07/2012 at 18:28, xxxxxxxx wrote:

      How can I deactivate an element from a description of an TagData tag?
      I want to be able to, dynamically, activate and deactivate some elements, based on if some checkmarks are on or off.

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 31/07/2012 at 19:11, xxxxxxxx wrote:

        The topic was up a short while ago.
        https://developers.maxon.net/forum/topic/6478/6965_deschide-and-desceditable

        An example:

          
        # Testing gray out controllers   
        def GetDEnabling(self, node, id, t_data, flags, itemdesc) :   
             if (id[0].id == c4d.PC_SPLINE_MIN ) :   
                  return node[c4d.PC_MAKESPLINE] == 1   
                          
             if (id[0].id == c4d.PC_SPLINE_MAX ) :   
                  return node[c4d.PC_MAKESPLINE] == 1   
          
             return True   
        

        From a user point of view, make sure you're not greying out
        parameters that a user may to edit prior to engage.
        For example if gigantic calculation is included, it
        may be that the user wants to lower a value before engaging it.
        Just a thought..

        Cheers
        Lennart

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 31/07/2012 at 19:54, xxxxxxxx wrote:

          Thank you very much, Lennart. It worked great.
          However, this method is new in version R13.029
          Was this impossible to do in versions prior to 13?

          Rui Batista

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 31/07/2012 at 20:19, xxxxxxxx wrote:

            I guess if it was not implemented until 13.029 it's not available for earlier versions.
            But the 13.xxx are free updates, so I can't see the problem?

            Cheers
            Lennart

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 01/08/2012 at 03:17, xxxxxxxx wrote:

              The problem is that people using R12 (that are still a lot) can't use my plugin 😉

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 01/08/2012 at 06:29, xxxxxxxx wrote:

                They can, but the dimming-stuff will not be available to them.

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 01/08/2012 at 08:31, xxxxxxxx wrote:

                  I figured I wouldn't make a new topic since it's similar to this.  When dealing with a Dialog that's called by a command plugin , is it possible to hide some of the gadgets with something similar to [c4d.DESC_HIDE]?  So when you check a box some controls appear or disappear?  Is that what GetDEnabling  is used for?

                  Dan

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 01/08/2012 at 09:16, xxxxxxxx wrote:

                    You can only disable/enable gadgets in your dialog. For hiding them, you would need to really remove them as gadgets, and add them when you need them again.

                    GetDEnabling is a function that you can override only for NodeData plugins (i.e. Objects, Tags, ..). It is not available in a CommandData plugin.

                    -Nik

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 01/08/2012 at 12:57, xxxxxxxx wrote:

                      Thanks, Niklas.

                      So  something like:

                        
                      self.LayoutFlushGroup(ControlsToDisable)   
                      self.LayoutChanged(ControlsToDisable)  
                      

                      to disable a group, and

                        
                      #Some sort of code to add new controls and then  
                      self.LayoutChanged(ControlsToEnable)  
                      

                      Is there a way to save a a gadget in a variable, so if I disable it I could re-enable it later with the same value and settings?

                      Dan

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