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

    detect auto keyframing is on? [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 578 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 03/04/2015 at 04:30, xxxxxxxx wrote:

      Hi all,

      I was wondering if there is some line of code that allows me to detect if automatic keyframing is turned on. Does anybody know? I've searched through the python documentation but I can't seem to find it. Thanks in advance!

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

        On 03/04/2015 at 06:23, xxxxxxxx wrote:

        I looked up the Plugin ID of the Autokeying command in the "Customize Commands..." window.

        ID_AUTOKEYING = 12425  
        print c4d.IsCommandChecked(ID_AUTOKEYING)
        

        Cheers
        Niklas

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

          On 03/04/2015 at 06:33, xxxxxxxx wrote:

          Thanks for the reply!

          However, it doesn't seem to work in a python node in Xpresso. When I put in the code like this:

          import c4d
          #Welcome to the world of Python

          def main() :
              global Output1
              Output1 = 1
              ID_AUTOKEYING = 12425
              print c4d.IsCommandChecked(ID_AUTOKEYING)

          It keeps printing False after I turned autokeying on. Any thoughts?

          Grtz!

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

            On 03/04/2015 at 07:19, xxxxxxxx wrote:

            Executing commands [via CallCommand()] is restricted to the main thread (and expressions are executed in their own thread). Maybe this applies to IsCommandChecked() as well.

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

              On 03/04/2015 at 07:28, xxxxxxxx wrote:

              Ok, I'll try a different approach. Thanks for the info!

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

                On 07/04/2015 at 06:38, xxxxxxxx wrote:

                Hi,

                just want to confirm that Niklas is right, these have to be called from main thread.

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

                  On 21/04/2015 at 06:57, xxxxxxxx wrote:

                  Hi hanswillem,
                  did you find a solution?

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