New Bevel Tool and SendModellingCommand

On 17/09/2013 at 19:36, xxxxxxxx wrote:

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


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_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.arr = NULL;   
        chk = SendModelingCommand(ID_MODELING_BEVEL_TOOL, cd);   
        if ( !chk) {   
            return FALSE;   

Thank you!

On 17/09/2013 at 22:52, xxxxxxxx wrote:

Hello you can find the new parameter definitions for new bevel in:
pay attention also the command ID is changed you can find the correct id in command manager ID_MODELING_BEVEL_TOOL is no more valid.
other than that the new bevel is a complete new system so some parameters are no more available and some other are new so i am sure you have to redesign part of your plugin.

On 17/09/2013 at 22:56, xxxxxxxx wrote:

You can also find them here if it helps.

On 18/09/2013 at 03:31, xxxxxxxx wrote:

Franz, thank you very much.

For some reason my search for "bevel" didn't turn up the xbeveltool.h header file when I searched the _api folder.

Thanks, kbar. That c4dconnect site is really cool. I shall bookmark it right away.

On 21/09/2013 at 06:10, xxxxxxxx wrote:

I work  at AMA tools too.

Seems Maxon moved to SetAction(431000015) // or new xBevelTool

I was wrong, all work