I have a working version of my extension Camera Keys here
Below is the code for the set keys. I would like to set each frame to linear if it’s possible. Or to be consistent with the timeline, how do I create image option buttons like these and get the values, then set the value when the keyframes are set.
def SetKeys_Click():
omni.kit.commands.execute('SetAnimCurveKeys',
paths=['/World/Camera.xformOp:translate|x'])
omni.kit.commands.execute('SetAnimCurveKeys',
paths=['/World/Camera.xformOp:translate|y'])
omni.kit.commands.execute('SetAnimCurveKeys',
paths=['/World/Camera.xformOp:translate|z'])
omni.kit.commands.execute('SetAnimCurveKeys',
paths=['/World/Camera.xformOp:rotateYXZ|x'])
omni.kit.commands.execute('SetAnimCurveKeys',
paths=['/World/Camera.xformOp:rotateYXZ|y'])
omni.kit.commands.execute('SetAnimCurveKeys',
paths=['/World/Camera.xformOp:rotateYXZ|z'])
timeline = omni.timeline.get_timeline_interface()
time = timeline.get_current_time()
fps = timeline.get_time_codes_per_seconds()
frame = time * fps
label.text = "6 Keys Were Set at frame " + str(frame)
Thanks for any tips.