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

    Proper method to hide tag?

    SDK Help
    0
    7
    654
    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 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 
              ,TAG_EXPRESSION | TAG_VISIBLE
      	, 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?

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

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

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

          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.

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

            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_COFFEE C.O.F.F.E.E. plugin.
            PLUGINFLAG_HIDEPLUGINMENU Hide the plugin's menu entry.
            PLUGINFLAG_REFRESHALWAYS In 8.5 CINEMA 4D uses cached descriptions for higher speed....

            _<_t_>_

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

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

              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.

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

                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: http://www.cplusplus.com/forum/general/1590/

                return RegisterTagPlugin(
                	/* ... */,
                	TAG_EXPRESSION | PLUGINFLAG_HIDE,
                	/* ... */
                );
                
                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

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

                  Thanks Niklas!
                  Das war aber nett!

                  You helped me out, now it works.

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