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

    Test "Lock Overrides" in Python

    Cinema 4D SDK
    python
    2
    4
    641
    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.
    • D
      danielsian
      last edited by

      Hi there, is it possible to test "Lock Overrides" and return if it is on or off using Python?
      The same question for the "Enable all overrides" button.

      Cheers

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @danielsian
        last edited by ferdinand

        Hello @danielsian,

        thank you for reaching out to us. Yes, this is possible with c4d.IsCommandChecked(). You just need the id for the command you are interested in, the Script Log is a good way to figure them out. See the example at the end of the posting for details.

        Cheers,
        Ferdinand

        The example:

        import c4d
        
        def main():
            """
            """
            # When the "Lock Overrides" button is checked ...
            if c4d.IsCommandChecked(431000108):
                print ("Do something")
        
        if __name__=='__main__':
            main()
        

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • D
          danielsian
          last edited by

          Thank you very much @ferdinand, that's exactly what I was looking for.
          Cheers

          ferdinandF 1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand @danielsian
            last edited by

            Hello @danielsian,

            without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state from this topic.

            Thank you for your understanding,
            Ferdinand

            MAXON SDK Specialist
            developers.maxon.net

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