On 31/12/2016 at 16:13, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) : C++ ;
---------
The docs are still using the outdated ToolData for the SetModelingAxis() example instead of BasePlugin.
Here's how I'm doing it in R13.
//This is a custom method that changes the Axis tool's attributes
//Select a polygon or point then look at the modeling axis tool's pallet
//When this method is executed it changes the axis mode to free
void SetToolData(BaseDocument *doc, LONG pluginid, LONG dataid, const GeData &dat)
{
BasePlugin *plug = static_cast<BasePlugin*>(FindPlugin(pluginid, PLUGINTYPE_TOOL));
if (!plug) return;
plug->SetParameter(DescID(dataid), dat, DESCFLAGS_SET_0);
}
//Call the above method like this from in one of you plugin's overridden methods
SetToolData(doc, ID_MODELING_LIVESELECTION, MDATA_AXIS_MODE, MDATA_AXIS_MODE_FREE);
-ScottA