Call a ToolData plugin as modeling command
-
On 21/02/2017 at 08:01, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I have a ToolData plugin.
The following code returns false:
ModelingCommandData cd; cd.doc = GetActiveDocument(); if (!SendModelingCommand(MY_TOOLDATA_PLUGIN_ID, cd)) return false;
I can see it as command in "Customize Commands" window and it works fine when I select it and click "Execute" there.
Why does SendModelingCommand fails to call it ?
Thank you.
-
On 22/02/2017 at 01:36, xxxxxxxx wrote:
Hello,
using the "Customize Commands" dialog you are just enabling the tool. This can also be achieved using BaseDocument::SetAction() (see BaseDocument Manual).
If you want to invoke the tool using SendModelingCommand() you have to implement ToolData::DoCommand() in your plugin class.
best wishes,
Sebastian -
On 17/03/2017 at 09:55, xxxxxxxx wrote:
Hello peterakos,
was your question answered?
best wishes,
Sebastian