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
    • Recent
    • Tags
    • Users
    • Login

    Tag plugin & attribute manager in COFFEE

    Scheduled Pinned Locked Moved SDK Help
    13 Posts 0 Posters 971 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 22/07/2011 at 14:09, xxxxxxxx wrote:

      COFFEE Plugin Expressin Tags and AM = no go.
      You must use Userdata.

      I recommend using Python for this.

      Cheers
      Lennart

      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 22/07/2011 at 14:09, xxxxxxxx wrote:

        Sorry, descriptions are not supported by COFFEE plugins.

        cheers,
        Matthias

        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 22/07/2011 at 15:39, xxxxxxxx wrote:

          Ok, I guess I'll move to Python then. Thanks 🙂
          Any idea about my second question?

          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 22/07/2011 at 17:24, xxxxxxxx wrote:

            For your second question, just use a link field. Check the docs for the LINK description element.

            cheers,
            Matthias

            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 23/07/2011 at 06:34, xxxxxxxx wrote:

              Thanks 🙂
              I found the description docs and wrote my files but now I get two errors when I create my tag, that I can't figure out how to fix. If anyone could help it would be cool...

              1- Dialog Resource is corrupted (filename does not match dialog id)
              ...but it does:

              CONTAINER Tdnode
              {
                NAME Tdnode;

              And the files are called:
              - res/description/Tdnode.res
              - res/description/Tdnode.h
              - res/strings_us/description/Tdnode.str

              2- Error reading resource file 'C:\Program Files\MAXON\CINEMA 4D R12\plugins\dagonbatch\res\description dnode.h'     Line 6
              And here's my Tdnode.h file:

              01|   #ifndef _Tdnode_H_
              02|   #define _Tdnode_H_
              03|  
              04|   enum
              05|   {
              06|    DGN_NODE_NAME = 1001;
              07|     DGN_NODE_CAMERA = 1002;
              08|   };
              09|  
              10|   #endif

              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 23/07/2011 at 06:58, xxxxxxxx wrote:

                Enums are seperated by commas not by semicolons. Like this:

                  
                #ifndef _Tdnode_H_  
                #define _Tdnode_H_  
                  
                enum  
                {  
                  DGN_NODE_NAME = 1001,  
                  DGN_NODE_CAMERA = 1002  
                };  
                  
                #endif  
                

                cheers,
                Matthias

                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 23/07/2011 at 07:26, xxxxxxxx wrote:

                  Oops indeed.

                  I'm still getting the other error though.
                  And a new one in the res file on line 6:

                  01| CONTAINER Tdnode
                  02| {
                  03|  NAME Tdnode;
                  04| 
                  05|  GROUP ID_NODEPROPERTIES
                  06|  {
                  07|    EDITTEXT DGN_NODE_NAME { ANIM OFF; }
                  08|    LINK DGN_NODE_CAMERA { ANIM OFF; ACCEPT { Ocamera; } }
                  09|  }
                  10|}

                  I don't see what's wrong here as line #6 only contains a { ...

                  Thanks for the fast reply.

                  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 23/07/2011 at 07:58, xxxxxxxx wrote:

                    You may want to check out Description Editor.

                    I can't spot the error here. Can you provide the full source ?

                    Cheers,
                    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 23/07/2011 at 08:07, xxxxxxxx wrote:

                      It looks like you are mixing things up. If your plugin is in COFFEE, it MUST use a dialog, not a description (the format is different). If you're using Python or C++ you can use either dialogs or descriptions.

                      But you can't load a description resource into a dialog or a dialog resource into a description. What you've written is a description resource (they all start with CONTAINER) rather than a dialog (which all start with DIALOG). What are you loading the resource into?

                      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 23/07/2011 at 09:14, xxxxxxxx wrote:

                        Originally posted by xxxxxxxx

                        What are you loading the resource into?

                        I'm using Python now, and it's a description I want.

                        Originally posted by xxxxxxxx

                        You may want to check out Description Editor.

                        I can't spot the error here. Can you provide the full source ?

                        Cheers,
                        niklas

                        I re-created my description using this editor and I'm still getting the "Dialog Resource is corrupted" error.

                        I'm also getting those:

                        - Symbol 'Node' not found, File 'C:\Program Files\MAXON\CINEMA 4D R12\plugins\dagonbatch3\res\description dnode.res', Line 3 Fixed

                        - Error reading resource, file 'C:\Program Files\MAXON\CINEMA 4D R12\plugins\dagonbatch3\res\description dnode.res', Line 9 Fixed, replaced EDITTEXT by STRING

                        Here's the code generated by editor:

                        /res/description/Tdnode.res

                        CONTAINER Tdnode {  
                            
                          NAME Tdnode;  
                          INCLUDE Tbase;  
                            
                          GROUP ID_NODEPROPERTIES {  
                              COLUMNS 1;  
                              DEFAULT 1;  
                              STRING DGN_NODE_NAME { ANIM OFF; }  
                              LINK DGN_NODE_CAMERA { ANIM OFF; ACCEPT { Ocamera; } }  
                          }  
                        }
                        

                        /res/description/Tdnode.h

                        #ifndef _TDNODE_H_  
                        #define _TDNODE_H_  
                          
                        enum {  
                          Tdnode = 10000,  
                          ID_NODEPROPERTIES,  
                          DGN_NODE_NAME,  
                          DGN_NODE_CAMERA,  
                        };  
                        #endif
                        

                        /res/strings_us/description/Tdnode.str

                        STRINGTABLE Tdnode {  
                          Tdnode "Dagon Node Properties";  
                          ID_NODEPROPERTIES "Node";  
                          DGN_NODE_NAME "Node name";  
                          DGN_NODE_CAMERA "Camera";  
                        }
                        

                        /res/c4d_symbols.h

                        enum  
                        {  
                          // End of symbol definition  
                          _DUMMY_ELEMENT_  
                        };
                        

                        I didn't write any code for my plugin yet, I'm just trying to make the tag work:
                        /DagonNodeData.pyp

                        import os  
                        import c4d  
                        from c4d import plugins, bitmaps  
                          
                        PLUGIN_ID = 1234   # Testing  
                          
                        class DagonNodeData(plugins.TagData) :  
                          """Dagon Node Tag"""  
                          
                          
                          
                        if __name__ == "__main__":  
                          path, fn = os.path.split(__file__)  
                          bmp = bitmaps.BaseBitmap()  
                          bmp.InitWith(os.path.join(path, "res", "DGN_NODE_TAG.tif"))  
                          plugins.RegisterTagPlugin(id=PLUGIN_ID, str="Dagon Node",  
                                                      g=DagonNodeData,  
                                                      description="Tdnode.res",  
                                                      icon=bmp,  
                                                      info=c4d.TAG_VISIBLE)
                        
                        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 23/07/2011 at 09:23, xxxxxxxx wrote:

                          The editor does not yet take care of that you use the right names for the elements.

                          CONTAINER Tdnode {  
                              
                              
                                    
                                NAME Tdnode;  // instead of _NAME Node;_  
                                 INCLUDE Tbase;  
                                  
                                GROUP ID_NODEPROPERTIES {  
                                    COLUMNS 1;  
                                    DEFAULT 1;  
                                    STRING DGN_NODE_NAME { ANIM OFF; }  // _EDITTEXT_ is not available in descriptions  
                                     LINK DGN_NODE_CAMERA { ANIM OFF; ACCEPT { Ocamera; } }  
                                }  
                              }
                          
                          And when registering, you don't add an .res to the description name.  
                          
                            
                                plugins.RegisterTagPlugin(id=PLUGIN_ID, str="Dagon Node",  
                                                            g=DagonNodeData,  
                                                            description="Tdnode",  # instead of _"Tdnode.res"_  
                                                             icon=bmp,  
                                                            info=c4d.TAG_VISIBLE)
                          
                          Cheers,  
                          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 23/07/2011 at 09:38, xxxxxxxx wrote:

                            That fixed the problem 😄
                            Thanks a lot, fellow Nux 🙂

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