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

    Cannot add attributes to custom tag

    SDK Help
    0
    5
    405
    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 04/05/2015 at 13:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I am attempting to create a custom tag plugin with a few attributes. The tag registers without issue, and I can add and remove it from objects. But no matter what I do, I can't seem to add new attributes to the description. I am only trying to add one bool attribute. I've created a simplified version of my project to demonstrate:
      **
      **
      Folder Structure
      - Tcustom

       | Tcustom.cdl64
       - res
       
        | c4d_symbols.h
        | Tcustom.tif
        - description
       
        || Tcustom.h
        || Tcustom.res
        - strings_us
       
         | c4d_strings.str
         - description
         
          | Tcustom.str

      Code
      https://gist.github.com/anonymous/53fda4bb8ee26f3f93f6

      I seem to be misunderstanding descriptions, I've been reading the C++ documentation but I can't seem to find any gotchas to fix this problem. Any help would be appreciated as I've been stuck on this issue for a few days.

      Thanks

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

        On 04/05/2015 at 15:24, xxxxxxxx wrote:

        Hello,

        there are some oddities in your code.

        In your Tcustom.h you define both the interface of your class and the enumeration. That is not what should be done here since this file is read by Cinema itself. It should only contain the actual enumeration (see example).

        So in the "Look at Camera" example of the SDK you see that only the symbol for the parameter is defined, not for the group. This is because this example uses the default group (ID_TAGPROPERTIES). You are using your own group (TCUSTOM_GROUP). So the name for that group should be also defined in Tcustom.str and not c4d_strings.str.

        best wishes,
        Sebastian

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

          On 05/05/2015 at 09:58, xxxxxxxx wrote:

          Thanks for you help. I performed the fixes you mentioned, but no luck. http://i.imgur.com/oM4yK1t.png
          Its now using the default group so I can simplify the process. I am trying to copy the SDK examples as closely as possible.

          I've placed my example in a repo for convenience.
          https://github.com/nomcycle/Tcustom

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

            On 05/05/2015 at 11:01, xxxxxxxx wrote:

            You need to initialize the plugin resource from PluginMessage(). The resource object is declared in "c4d_resource.h"

            Bool PluginMessage(Int32 msg, void* p_data)
            {
              switch (msg) {
                case C4DPL_INIT_SYS:
                  return ::resource.Init();
              }
              return true;
            }
            

            Best,
            -Niklas

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

              On 05/05/2015 at 11:32, xxxxxxxx wrote:

              Yep, that worked. I updated the example accordingly. Thanks!

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