Class abstract type returning error

On 16/06/2014 at 03:45, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   14 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

I changed the class type of my plugin from:

class cPolyPaintTool : public ToolData   


class cPolyPaintTool : public DescriptionToolData   

and now, the line:

return RegisterToolPlugin(ID_POLYPAINTTOOL, GeLoadString(IDS_POLYPAINTTOOL),PLUGINFLAG_TOOL_OBJECTHIGHLIGHT,AutoBitmap("icontool.tif"),GeLoadString(IDS_POLYPAINTTOOL_HELP), gNew cPolyPaintTool);

returns an error of "Allocating an object of abstract class type 'cPolyPaintTool'"

If I get back to ToolData, it builds fine.
What can I bo doing wrong?

On 16/06/2014 at 03:55, xxxxxxxx wrote:

You should also see information on what methods are missing an implementation

If you inherit from DescriptionToolData, you _must_ provide an implementation for

 virtual Int32 GetToolPluginId() = 0;
 virtual const String GetResourceSymbol() = 0;


The = 0; part just means that there will be no implementation of this method
of the declaring class and makes the class abstract therefore.


PS: You may want to adjust the title, the topic isn't about plugin description files.

On 16/06/2014 at 04:08, xxxxxxxx wrote:

Isn't that for release 15? I'm using release 14 and it tells nothing about it in the SDK.

On 16/06/2014 at 04:13, xxxxxxxx wrote:

Anyway, it is working now, with this:

class cPolyPaintTool : public DescriptionToolData   
          virtual LONG          GetToolPluginId() {return ID_POLYPAINTTOOL;}   
          virtual const String GetResourceSymbol() {return "ToolPolyPaintTool";}   
          virtual LONG          GetState(BaseDocument* doc);   
          virtual void          InitDefaultSettings(BaseDocument *doc, BaseContainer &data;);   

Thank you, Niklas.