detect auto keyframing is on? [SOLVED]



  • 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!



  • 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



  • 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!



  • 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.



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

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



  • 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.



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

    Hi hanswillem,
    did you find a solution?


Log in to reply