Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    New Bevel Tool and SendModellingCommand

    SDK Help
    0
    5
    529
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        Hello you can find the new parameter definitions for new bevel in:
        cinemaFolder/resource/modules/modeling/res/xbeveltool.h
        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.
        Franz

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          You can also find them here if it helps.

          http://c4dconnect.com/Description/Node?containerName=xbeveltool

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

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

              Hi
              I work  at AMA tools too.

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

              Upd.
              I was wrong, all work

              1 Reply Last reply Reply Quote 0
              • First post
                Last post