Hide attributes

On 22/12/2017 at 02:38, xxxxxxxx wrote:

Hello plugincafe!
I need to hide X-Ray checkbox of Generator Plugin.

The only way that I found is 'ghosting' and it works without any problems.

#Ghosting X-Ray Attribute
    def GetDEnabling(self, node, id, t_data, flags, itemdesc) :
        if id[0].id == c4d.ID_BASEOBJECT_XRAY:  return False

But I want to completely hide it from attributes manager.

I tried to do this from description file but I'm not getting desired results.

  1. CONTAINER Otestplugin
  2. {
  3.     NAME Otestplugin;
  4.     INCLUDE Obase;
  6.     	//Groups & Settings

Is there a way to do this directly from pyp file or from description file?

Cheers! :)


On 22/12/2017 at 03:13, xxxxxxxx wrote:

You can retrieve the description and hide it.
I'm on my phone so I don't have an exemple but few links that may help you.


I'm pretty sure you can have the basecontainer from GetDEnabling

Hope its help.

On 22/12/2017 at 06:40, xxxxxxxx wrote:


Note it's not recommended to change an object's description from GetDEnabling() as it is generated again afterwards in the next call to GetDDescription().
GetDEnabling() should only be used to provide the enabled state of the given parameter.
GetDDescription() is the function where an object's description is defined and can be altered.

Unfortunately, it seems ID_BASEOBJECT_XRAY hidden state is always set to false for generators.
This needs some further investigation to see if there's a way to circumvent such behavior.