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

    UNTRIANGULATE command with disabled ANGLE

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 428 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 23/12/2017 at 03:24, xxxxxxxx wrote:

      Hello Plugincafe!
      I'm using MCOMMAND_UNTRIANGULATE in my code but by default, it has Evaluate Angle checkbox enabled.
      I need to uncheck this option from its base container but I'm getting this error:
      AttributeError: 'module' object has no attribute 'IDC_UNTRIANGULATE_ANGLE'

          #Untriangulate
              untriangulate_settings = c4d.BaseContainer()
              **untriangulate_settings[c4d.IDC_UNTRIANGULATE_ANGLE] = False**
              res = c4d.utils.SendModelingCommand     (command = c4d.MCOMMAND_UNTRIANGULATE,
                                                       list    = [poly],
                                                       mode    = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,
                                                        **bc       = untriangulate_settings,**
                                                       doc     = doc)
      

      is it possible to execute this command with disabled 'Evaluate Angle'?

      Cheers! 🙂

      -Merk

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

        On 23/12/2017 at 03:48, xxxxxxxx wrote:

        OK. I found a way to solve this.

            #Untriangulate
                untriangulate_settings = c4d.BaseContainer()
                **untriangulate_settings[c4d.MDATA_UNTRIANGULATE_ANGLE_RAD] = c4d.utils.Rad(90)**
                res = c4d.utils.SendModelingCommand     (command = c4d.MCOMMAND_UNTRIANGULATE,
                                                         list    = [poly],
                                                         mode    = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,
                                                         bc      = untriangulate_settings,
                                                         doc     = doc)
        

        I simply had to increase angle value, up to 90 degrees to get the same result that can be achieved by unchecking Evaluate Angle checkbox from UNTRIANGULATE command 🙂

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

          On 26/12/2017 at 03:00, xxxxxxxx wrote:

          Hi,

          You should use MDATA_UNTRIANGULATE_ANGLE instead to disable angle evaluation for untriangulate command. You just have to set it to False into the settings container.
          MDATA_UNTRIANGULATE_ANGLE is currently missing in the Python docs. This will be fixed.

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