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

    [SOLVED]How to hide tags in Object Manager?

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

      On 26/01/2017 at 20:06, xxxxxxxx wrote:

      Hi,guys.

      Why does this code don't work from Python tag?

        
      tag.ChangeNBit(c4d.NBIT_THIDE, c4d.NBITCONTROL_SET)  
      

      what am I doing wrong?  Please help🙂

      Thank you.

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

        On 27/01/2017 at 03:03, xxxxxxxx wrote:

        Hello,

        welcome to the Plugin Café forums !Smile[URL-REMOVED]

        I have moved this thread to the Python sub-forum, I felt, that's more appropriate.

        It's not possible to dynamically hide tags. The bit NBIT_THIDE has nothing to do with tags, but is for hiding objects in the timeline. Unfortunately this information is missing currently in the Python docs, in such cases it can be a good idea to check our C++ Docs, where there's at least a bit more info on NBIT_THIDE.

        But you can hide your own custom TagData plugin (assuming it's your Python tag, you want to hide), when it is registered (info parameter, tag plugin flag 
        TAG_VISIBLE). This of course means, you'd have to move your code from a Python tag into a TagData plugin, but that's nothing you should be afraid of. Basically the code from your Python tag would go into the Execute() function of the plugin and you'd basically need to add the registration stuff around. Therefore I'd say, take a look at the Python examples on GitHub, e.g. the Py-LookAtCamera.


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

          On 27/01/2017 at 17:27, xxxxxxxx wrote:

          You actually can with NBIT_OHIDE. Not sure if NBIT_THIDE is used somewhere, since there's also flags
          to hide a node in each timeline window separately.

          Container object does just that, btw. 

          Cheers,
          -Niklas

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

            On 27/01/2017 at 20:47, xxxxxxxx wrote:

            Hello Niklas,
             Thank you very much for your answer.👍

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

              On 30/01/2017 at 02:44, xxxxxxxx wrote:

              Uh oh!
              I'm terribly sorry for delivering false information 😊

              Thanks Niklas for correcting me.
              To be honest, I believed in our documentation and wasn't aware NBIT_OHIDE (in C++ docs) works for tags as well. Indeed it does and I will correct the docs accordingly.
              Sorry, guys!

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

                On 30/01/2017 at 20:41, xxxxxxxx wrote:

                Hi,Andreas

                Thanks so much for your detailed response!
                I am trying this code below,and it works well!

                  
                import c4d  
                  
                def main() :  
                  obj = op.GetObject()  
                  tag = obj.GetTag(1001149)  
                  tag.ChangeNBit(c4d.NBIT_OHIDE,c4d.NBITCONTROL_SET)  
                  
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post