This is in response to feedback to the changes from #113504 While it does simplify inserting keyframes, sometimes artists want to insert keys only to e.g. Location. This takes longer to do now, since the option is in a menu. This PR changes the following: * new `K` hotkey to bring up the "Keying Set" menu. This will always show the menu, even if a keying set is active. * `Shift + K` will open a menu to set the active keying set * with "Pie Menu on Drag" enabled in the user preferences, hitting `I` and moving the mouse will bring up a pie menu to insert only specific transform channels Conceptually this separates the keying set behavior from the insert keyframe behavior. `I` will always add keyframes. While `K` always shows keying set options. Pull Request: https://projects.blender.org/blender/blender/pulls/115798
32 lines
825 B
Python
32 lines
825 B
Python
from bpy.types import Menu
|
|
|
|
|
|
class ANIM_MT_keyframe_insert_pie(Menu):
|
|
bl_label = "Keyframe Insert Pie"
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
pie = layout.menu_pie()
|
|
|
|
prop = pie.operator("anim.keyframe_insert_by_name", text="Location")
|
|
prop.type = "Location"
|
|
|
|
prop = pie.operator("anim.keyframe_insert_by_name", text="Scale")
|
|
prop.type = "Scaling"
|
|
|
|
prop = pie.operator("anim.keyframe_insert_by_name", text="Available")
|
|
prop.type = "Available"
|
|
|
|
prop = pie.operator("anim.keyframe_insert_by_name", text="Rotation")
|
|
prop.type = "Rotation"
|
|
|
|
|
|
classes = (
|
|
ANIM_MT_keyframe_insert_pie,
|
|
)
|
|
|
|
if __name__ == "__main__": # only for live edit.
|
|
from bpy.utils import register_class
|
|
for cls in classes:
|
|
register_class(cls)
|