On 17/09/2013 at 19:36, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Hello,
I am trying to update Chamfer Maker for R15. Since Chamfer Maker uses SendModellingCommand internally to do the actual bevels I was thinking I just need to update the BaseContainer settings to work with the new equivalent symbols that correspond to the settings for the new bevel tool.
However I am finding that toolbevel.h still has the old symbols such as MDATA_BEVEL_OFFSET2 et al.
In my short Python sample script though I see that when dragging the paramaters into the script editor from the new bevel tool that for example the Radius parameter is no longer called MDATA_BEVEL_OFFSET2 but MDATA_BEVEL_RADIUS and so on.
Basically, I am looking to make the following snippet work with the new bevel tool:
(the code uses the __LEGACY_API define)
BaseContainer bc;
bc.SetReal(MDATA_BEVEL_OFFSET2, data->GetReal(AMa_CHMMKR_RAD_a));
bc.SetReal(MDATA_BEVEL_VARIANCE2, data->GetReal(AMa_CHMMKR_VARIANCE));
bc.SetLong(MDATA_BEVEL_SUBDIVISION, data->GetLong(AMa_CHMMKR_SUBDIVISION));
bc.SetBool(MDATA_BEVEL_CREATENGONS, data->GetBool(AMa_CHMMKR_CREATENGONS));
bc.SetLong(MDATA_BEVEL_MODE, C4D_Bevel_Mode);
bc.SetData(MDATA_BEVEL_PATH, ( data->GetData(AMa_CHMMKR_PATH)));
bc.SetReal(MDATA_BEVEL_OFFSET1, data->GetReal(AMa_CHMMKR_EXTRUSION));
bc.SetReal(MDATA_BEVEL_VARIANCE1, data->GetReal(AMa_CHMMKR_EXTRU_VARI));
ModelingCommandData cd;
cd.doc = op->GetDocument();
cd.bc = &bc;
cd.op = obj;
cd.mode = MODELINGCOMMANDMODE_EDGESELECTION;
cd.arr = NULL;
chk = SendModelingCommand(ID_MODELING_BEVEL_TOOL, cd);
if ( !chk) {
return FALSE;
}
Thank you!