Cannot add attributes to custom tag

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


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.


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


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,

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

Thanks for you help. I performed the fixes you mentioned, but no luck.
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.

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;


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

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