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
    • Recent
    • Tags
    • Users
    • Login

    Can we remove N-gons ?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 349 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 30/06/2013 at 15:51, xxxxxxxx wrote:

      Hello,

      I am trying to remove N-gons, but the only command I found is ID_NGON_REMOVE_MENU who don't seems to work :

      import c4d  
        
      def main() :  
        print c4d.utils.SendModelingCommand(command = c4d.ID_NGON_REMOVE_MENU,  
                                list = [op],  
                                mode = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,  
                                doc = doc)  
        
      if __name__=='__main__':  
        main()  
      

      The function return False, so I guess there is a problem somewhere... By the way all the « modeling library menu commands » return False. Is there something I am doing wrong ?

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

        On 01/07/2013 at 04:18, xxxxxxxx wrote:

        I've never used SendModelingCommand in Python, but I'm pretty sure you're using the wrong ID. That ID looks like one you would use with CallCommand() - which is very different from SendModelingCommand.

        CallCommand() might be all you need but if not then you'll need to look through all the IDs in SendModelingCommand and see if there's one there that will do it.

        Edit: Sorry, I'm quite wrong of course. That's a perfectly valid command but I'm not sure why it doesn't work. Hm.

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

          On 01/07/2013 at 12:53, xxxxxxxx wrote:

          first of all smc is quite buggy and should be avoided if possible. unfortunately there is no other way to interact with ngons in python. one thing that sometimes does help is performing the command on a cloned document.

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