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

    RegisterTagPlugin, Can't find the issue

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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 07/05/2011 at 11:29, xxxxxxxx wrote:

      Hi guys,

      I'm trying to register a TagPlugin, but I just can't find the issue.
      The following Code is for registering:

        
        @classmethod  
        def Register(cls, path) :  
            data    =   \  
            {     
                'id':           1000002,    # id for developing use  
                'str':          "Mesh Saver",  
                'info':         c4d.TAG_VISIBLE | c4d.TAG_EXPRESSION,  
                'description':  "Tmeshsaver",  
            }  
            icon            = None  
        
            RegisterTagPlugin(g = cls, icon = icon, **data)  
      

      C4D Tells me that the global ressource could not be initialised. 🤢

      I have the following structure:

        
        Py-Mesh Saver\  
          Tmeshsaver.pyp  
          res\  
              c4d_symbols.h  
              description\  
                  Tmeshsaver.h  
                  Tmeshsaver.res  
              strings_us\  
                  description\  
                      Tmeshsaver.str  
      

      and these are my ressourcefiles:

        
      ########################################  
      Tmeshsaver.h  
      ########################################  
        
      #ifndef _TMESHSAVER_H_  
      #define _TMESHSAVER_H_  
        
      enum  
      {  
        BTN_SAVEMESH        = 1000  
      };  
      #endif  
        
      ########################################  
      Tmeshsaver.res  
      ########################################  
        
      CONTAINER  
      {  
        NAME        Tmeshsaver;  
        INCLUDE     Tbase;  
        
        GROUP       ID_TAGPROPERTIES  
        {  
            BUTTON      BTN_SAVEMESH    { }  
        }  
      }  
      ########################################  
      Tmeshsaver.str  
      ########################################  
        
      STRINGTABLE Tmeshsaver  
      {  
        Tmeshsaver      "Mesh Saver";  
        
        BTN_SAVEMESH    "Save Mesh";  
      }  
      

      Do you have any idea ?

      Thanks in advance !
      Niklas

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 07/05/2011 at 13:39, xxxxxxxx wrote:

        In the scope of the pyp file there is an object called __res__. You have to make the _res_ reference from the global scope available in the scope where you register your tag.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 08/05/2011 at 00:34, xxxxxxxx wrote:

          Unofrtunately, this doesn't solve the problem.
          I also couldn't find this way in any of the example Plugins..

          Better I provide the whole source.
          http://www.file-upload.net/download-3415032/Py-Mesh-Saver.rar.html

          Thanks,
          Niklas

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 08/05/2011 at 06:19, xxxxxxxx wrote:

            Remove res=__res__, in this case its uncessary indeed. One of your folder is called string_us, but it must be strings_us. Thats why the resource structure for this plugin fails on build.

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 08/05/2011 at 08:26, xxxxxxxx wrote:

              Perhaps I'm wrong.
              But it looks like you're also missing the proper naming convention at the top of your .res file.

              I believe it should read: CONTAINER Tmeshsaver

              -ScottA

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 08/05/2011 at 11:50, xxxxxxxx wrote:

                Oh my god, thanks Sebastian !
                And Scott you are right too.

                Much thanks to both of you 🙂
                I really hate writing resource files .. There should be a reseditor for it

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