Searching for python syntax...

   1177   0   0
User Avatar
Member
41 posts
Joined: May 2021
Offline
How do you turn "on" or "off" autokey button on timeline with python?

Edit: After some more digging trough help, it seems that I need to use hotkeys... is there a way to store a hotkey value in a python variable?

Edit nr. 2 After MORE digging it seems that I have to go trough hou.getPreference... now the question is which one of the anim. preferences names is Auto Key checkbox?

Edit nr. 3 Well after MORE DIGGING trough the mess the hou.getPreferenceNames() (or whatever) puked on me, here they are, the almighty preference variable names (regarding animation):

'anim.underlinescoped.val'
'anim.followscopedchannelreferences.val'
'anim.underlinescopedcolor.val'
'anim.includeconstraints.val'
'anim.includechild.val'
'anim.includeanim.val'
'anim.autoupdatechannels.val'
'anim.setautoscope.val'
'anim.nopendingkey.val'
'anim.autokeytuples.val'
'anim.slope.val'
'anim.firstfunc.val'
'anim.autofunc.val'
'anim.autoslope.val'
'anim.holdlastkey.val'
'anim.firstfunc.menu'
'anim.setfirstkey.val'
'anim.addedfunc.val'
'anim.addedfunc.menu'
'anim.keepchannelselection.val'
'anim.setkey.val'
'anim.rotationfunc.val'

Now... the trick is to know which one of these names corresponds to auto key state, my bet is on 'anim.autoupdatechannels.val' ... what is yours? Really people at Sidefx... I mean... really? The lack of documentation on this s%#t is criminal.
Now the next step (if my choice of the name is correct) is to hou.get blabla switch to hou.set blabla and hope that the markings "AUTO" on the button switches on or off? Is this how it's suppose to work? Some syntax would be nice...

Edit nr.4
Well after turning on and off a few of parameters, and some cross-checking of checkboxes it seems that Auto key does not have it's own function?!?!?! Tell me that I'm wrong!? Back to digging last night and I found this old thread https://www.sidefx.com/forum/topic/20561/?page=1#post-272064 [www.sidefx.com] from 2009, now it seems that is impossible to call a hotkey from within a HDA? Has that changed in newer versions of Houdini?
Edited by kriegmesser74 - June 8, 2021 12:40:27
  • Quick Links