Skip to content

Commit

Permalink
#74 Search Select work from Edit mode now
Browse files Browse the repository at this point in the history
Added support for search and select from Edit Mode
  • Loading branch information
Weisl committed Sep 12, 2021
1 parent 0846a06 commit c687995
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion renaming_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def execute(self, context):
obj.select_set(True)

elif str(wm.renaming_object_types) == 'BONE':
bpy.ops.pose.select_all(action='DESELECT')
if bpy.context.mode == 'POSE':
bpy.ops.pose.select_all(action='DESELECT')
elif bpy.context.mode == 'EDIT_ARMATURE':
bpy.ops.armature.select_all(action='DESELECT')

for bone in selectionList:
bone.select = True
Expand Down
2 changes: 1 addition & 1 deletion renaming_panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def drawSimpleUi(self, context):
layout.prop(scene, "renaming_replace")

if scene.renaming_object_types == 'BONE':
if context.mode == 'POSE':
if context.mode == 'POSE' or context.mode == 'EDIT_ARMATURE':
row = layout.row(align=True)
row.operator("renaming.search_select", icon="RESTRICT_SELECT_OFF")

Expand Down

0 comments on commit c687995

Please sign in to comment.