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

    c4d. ID_MODELING_BEVEL_TOOL Not Valid

    Scheduled Pinned Locked Moved Bugs
    2 Posts 0 Posters 575 Views
    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 Offline
      Helper
      last edited by

      On 02/11/2016 at 15:25, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   18 
      Platform:      
      Language(s) :       PYTHON  ;

      ---------
      If I try to send a modeling command with c4d.ID_MODELING_BEVEL_TOOL I always get a False result. However, if I use the command ID: 431000015, I get the expected bevel.

      It seems like the Command ID hasn't been updated? If it has, then the recommended command ID should be updated in the Documentation for Send Modeling Command.

        
      """SimpleBevel   
      Bevels the selected polygon object.   
      """   
        
      import c4d   
      from c4d import gui   
        
      def Bevel(op, offset=10.0, subdivision=0) :   
          if op is None:   
              return False   
        
          settings = c4d.BaseContainer()   
          settings[c4d.MDATA_BEVEL_OFFSET_MODE] = c4d.MDATA_BEVEL_OFFSET_MODE_FIXED   
          settings[c4d.MDATA_BEVEL_RADIUS] = 10.0   
          settings[c4d.MDATA_BEVEL_SUB] = subdivision   
          settings[c4d.MDATA_BEVEL_EXTRUSION] = offset   
          settings[c4d.MDATA_BEVEL_POLY_ANGLE] = c4d.utils.Rad(91.0)   
          settings[c4d.MDATA_BEVEL_GROUP] = True   
             
          c4d.utils.SendModelingCommand(command = c4d.ID_MODELING_BEVEL_TOOL,   
                                          list = [op],   
                                          mode = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,   
                                          bc = settings,   
                                          doc = doc)   
        
      def main() :   
          Bevel(op)   
          c4d.EventAdd()   
        
      if __name__=='__main__':   
          main()   
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 03/11/2016 at 03:21, xxxxxxxx wrote:

        Hi Donovan,

        thanks for pointing this out.

        Actually ID_MODELING_BEVEL_TOOL is still pointing to the old bevel tool and this can't be used with SendModelingCommand(). So, the behavior you see with that ID is actually not a bug. In C++ docs this is noted down, unfortunately the comment is missing in the Python docs. This will be fixed.
        Additionally ID_MODELING_BEVEL_TOOL should (and will) be marked as deprecated.
        A define for the ID (431000015) of the new bevel tool is unfortunately missing, yet. It will be added with one of the next releases.

        Sorry for the inconvenience this may have caused.

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