Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Get mode (object, face, edge, point) with python

    Cinema 4D SDK
    python
    3
    4
    667
    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.
    • W
      wen
      last edited by

      I'm working on an alignment tool and I need to know if the user is currently manipulating edges, vertices or face or is in object mode.
      Is there a way to query the current mode state with python? So i want to know which of these buttons is selected.
      mode.png l)

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by

        See the docs: BaseDocument.GetMode()

        1 Reply Last reply Reply Quote 0
        • S
          s_bach
          last edited by

          Hello,

          the edit mode is stored with the current BaseDocument and accessed with GetMode(). See also IsEditMode().

          if doc.GetMode() != c4d.Mmodel:
              return
          

          best wishes,
          Sebastian

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          1 Reply Last reply Reply Quote 1
          • W
            wen
            last edited by

            Thanks Sebastian.

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