Dimming elements of a description

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.

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://plugincafe.maxon.net/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

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

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

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 ;-)

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.

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

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

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