Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Tag GetInfo() help

    Cinema 4D SDK
    2
    4
    931
    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.
    • N
      noseman
      last edited by m_adam

      A common friend was looking into a way to copy tags from one object to another using Python,
      It appears that we have invisible tags, tags that can't have more than one of the same type e.t.c.
      As far as I was told, we can use GetInfo() to get some of this information from the tag. The problem is that searching for "GetInfo()" won't return a result in either the Python or C++ documentation, and I can't find a list of what the info returns.
      Is there somewhere I can look?

      Thanks
      Thanassis

      1 Reply Last reply Reply Quote 0
      • N
        noseman
        last edited by m_adam

        So, I did a bit more research after searching broader in the forum and here's a script that prints out the GetInfo() about the tag:

        import c4d
        def main():
        
            tags    = op.GetTags()
        
            for tag in tags:
                if not tag: continue
                print tag
                if tag.GetInfo() & c4d.TAG_VISIBLE:
                    print "visible"
                    
                if tag.GetInfo() & c4d.TAG_HIERARCHICAL:
                    print "hierarchical"        
                
                if tag.GetInfo() & c4d.TAG_EXPRESSION:
                    print "expression"
                    
                if tag.GetInfo() & c4d.TAG_TEMPORARY:
                    print "temporary"
                    
                if tag.GetInfo() & c4d.TAG_MODIFYOBJECT:
                    print "modifyObject"
        
                if tag.GetInfo() & c4d.TAG_ADDTOTAKEGROUP:
                    print "add to take group"
              
            c4d.EventAdd()
        
        if __name__=='__main__':
            main()
        
        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by m_adam

          Hi Thanassis, as you may know, or not, almost all components, users are used to use in Cinema 4D can be considered as a plugin such as objects (generator, modifier, spline), tags, shaders, materials, etc...

          When the developer register this plugin, it has to define some behaviors. For an object its a bit more explicit than for a tag so I take an object as an example.
          So for an object, (meaning something that can be displayed and stored in the Object Manager), when the developer register this particular Object plugin it should define some behaviors, is it a generator, is it a modifier, does it need other object to generate data?
          This information of these flags can be retrieved from any instance of this plugin with the function GetInfo, which contains all this information under a bitfield.
          So all possibles values of GetInfo depend on the plugin type you are currently retrieving the information.
          To know the type (if it's a tag, or an object, or a shader, etc...) you can use GetClassification

          Note: All possible flags for each plugin type are listed under the register method of this plugin type in the Python Documentation.

          I hope this answers your question.
          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          N 1 Reply Last reply Reply Quote 2
          • N
            noseman @m_adam
            last edited by

            @m_adam Great info. Thanks Maxime!

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