Proper method to hide tag?

On 09/06/2013 at 06:22, xxxxxxxx wrote:

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

What is the proper way to hide a tag?
I can hide it by using an empty string in the register method:

Bool RegisterMyAbstractTag (void)
	return RegisterTagPlugin (ID_MYABSTRACTTAG
	,"" //empty string 
	, MyAbstractTag::Alloc, 
        "Tmyabstracttag", AutoBitmap ("dontbother.tif"), 0);

But is this adequate?
I want this because I am using a tag as the ultimate ancestor for several descendant tags. And the ancestor serves no purpose alone.

Another question, why would I want to register a tag without TAG_VISIBLE? Who wants a tag that no one can tell is there? Well, I mean, I can understand the use of such tags, technically seen. So I guess in case you want a hidden tag, you also want to use the empty string approach, as I describe?

On 09/06/2013 at 06:32, xxxxxxxx wrote:

there are different ways to read 'hide a tag'.

1. on a plugin level. you can hide plugins from the users view in the menus. some base plugin
registration flags deal with that topic

2. on the object level. that is what TAG_VISIBLE is refering to. invisible tagsare a pretty 
common concept in c4d. each polygon object has for example an invisible point and polygon 
data tag. soft selections are also invisible tags and so on. you see the pattern. you can always 
hide any GeListNode manually with its NBITS (NBIT_OHIDE_SOMETHING).

On 09/06/2013 at 06:53, xxxxxxxx wrote:

Ok, if you happen to know what those flags might be, and where I apply them, I would be very interested to know! Because the only way I know about right now, is the aforementioned empty string.

On 09/06/2013 at 07:03, xxxxxxxx wrote:

which flags ? the base flags to hide a plugin from the menus ? they are all documented in the sdk.

  • Plugin General Flags
PLUGINFLAG_HIDE Hide the plugin.
PLUGINFLAG_SMALLNODE Create a small node.
PLUGINFLAG_HIDEPLUGINMENU Hide the plugin's menu entry.
PLUGINFLAG_REFRESHALWAYS In 8.5 CINEMA 4D uses cached descriptions for higher speed....


those flags are applicable to all plugins (at least i do not know a plugin type that does not accept them).

On 09/06/2013 at 07:16, xxxxxxxx wrote:

Hi and thanks. I still have absolutely no idea when and where to return PLUGINFLAG_HIDE.
I have tried to implement a method:

    virtual LONG GetInfo();

but it is never called.
So I am where I was, when I started this thread.

On 09/06/2013 at 07:46, xxxxxxxx wrote:

Littledevil pointed it out in his first reply. TAG_VISIBLE is what makes your tag visible (as the name implies) on an object. If you want to hide it in the menu, use the respective flag (as he pointed out in the second post).

GetInfo() returns what you passed to the register method. It is not marked virtual, you can not overwrite it. In your code from the first post, GetInfo() will return TAG_EXPRESSION | TAG_VISIBLE.

Here's all information you need:

You can learn about bitflags here:

return RegisterTagPlugin(
	/* ... */,
	/* ... */

On 09/06/2013 at 08:52, xxxxxxxx wrote:

Thanks Niklas!
Das war aber nett!

You helped me out, now it works.