Skip to content

Commit

Permalink
Add ToggleAutoKeyingOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
passivestar committed Nov 28, 2022
1 parent ab70bc2 commit ffb6a51
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 11 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

bl_info = {
'name': 'QuickMenu',
'version': (2, 4, 6),
'version': (2, 4, 7),
'author': 'passivestar',
'blender': (3, 3, 0),
'location': 'Press the bound hotkey in 3D View',
Expand Down Expand Up @@ -1637,6 +1637,15 @@ def execute(self, context):
bpy.ops.mesh.select_all(action='DESELECT')
return {'FINISHED'}

class ToggleAutoKeyingOperator(bpy.types.Operator):
"""Toggle Auto Keying"""
bl_idname, bl_label, bl_options = 'qm.toggle_auto_keying', 'Toggle Auto Keying', {'REGISTER', 'UNDO'}

def execute(self, context):
context.scene.tool_settings.use_keyframe_insert_auto = not context.scene.tool_settings.use_keyframe_insert_auto
self.report({'INFO'}, f'Auto Keying: {context.scene.tool_settings.use_keyframe_insert_auto}')
return {'FINISHED'}

class ParentToNewEmptyOperator(bpy.types.Operator):
"""Parent To New Empty"""
bl_idname, bl_label, bl_options = 'qm.parent_to_new_empty', 'Parent To New Empty', {'REGISTER', 'UNDO'}
Expand Down Expand Up @@ -1927,7 +1936,7 @@ class QuickMenuProperties(bpy.types.PropertyGroup):
SimpleDeformOperator, ClearModifiersOperator, DeleteBackFacingOperator,
SeparateByLoosePartsOperator, StraightenUVsOperator, UVProjectModifierOperator, MarkSeamOperator,
MarkSeamsSharpOperator, MarkSeamsFromIslandsOperator, TransformUVsOperator, SetVertexColorOperator, SelectByVertexColorOperator, BakeIDMapOperator, EditAlbedoMapOperator,
BooleanOperator, WeldEdgesIntoFacesOperator, ParentToNewEmptyOperator, ClearDriversOperator, SetUseSelfDriversOperator,
BooleanOperator, WeldEdgesIntoFacesOperator, ToggleAutoKeyingOperator, ParentToNewEmptyOperator, ClearDriversOperator, SetUseSelfDriversOperator,
PlaneIntersectOperator, KnifeIntersectOperator, IntersectOperator, TransformOrientationOperator, TransformPivotOperator,
SetSnapOperator, ModeOperator, ToolOperator, SaveAndReloadOperator, ReimportTexturesOperator, UnpackAllDataToFilesOperator, ExportOperator, ViewOperator,

Expand Down
7 changes: 7 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,13 @@
{
"path": "(R) Animation/[Separator]"
},
{
"path": "(R) Animation/(Q) Toggle Auto Keying",
"operator": "qm.toggle_auto_keying"
},
{
"path": "(R) Animation/[Separator]"
},
{
"path": "(R) Animation/(Z) Clear Drivers",
"operator": "qm.clear_drivers"
Expand Down

0 comments on commit ffb6a51

Please sign in to comment.