[Bf-blender-cvs] [6fdfa556678] master: Fix T60030: Select pattern fails with pose bones
Dalai Felinto
noreply at git.blender.org
Wed Jan 2 13:49:17 CET 2019
Commit: 6fdfa556678ec88231f21bd444e9f628a36008ce
Author: Dalai Felinto
Date: Wed Jan 2 10:22:00 2019 -0200
Branches: master
https://developer.blender.org/rB6fdfa556678ec88231f21bd444e9f628a36008ce
Fix T60030: Select pattern fails with pose bones
The original comment in the file was not acknoledging pose bones could be tacked
here as well (my fault since I should not have trusted the comments and read the code
intead).
Problem introduced on aeb8e81f2741.
===================================================================
M release/scripts/startup/bl_operators/object.py
===================================================================
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 660f87aea0d..14f55ef8fb0 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -62,11 +62,13 @@ class SelectPattern(Operator):
pattern_match = (lambda a, b:
fnmatch.fnmatchcase(a.upper(), b.upper()))
is_ebone = False
+ is_pbone = False
obj = context.object
if obj and obj.mode == 'POSE':
items = obj.data.bones
if not self.extend:
bpy.ops.pose.select_all(action='DESELECT')
+ is_pbone = True
elif obj and obj.type == 'ARMATURE' and obj.mode == 'EDIT':
items = obj.data.edit_bones
if not self.extend:
@@ -77,7 +79,7 @@ class SelectPattern(Operator):
if not self.extend:
bpy.ops.object.select_all(action='DESELECT')
- # Can be pose bones or objects
+ # Can be pose bones, edit bones or objects
for item in items:
if pattern_match(item.name, self.pattern):
@@ -90,6 +92,8 @@ class SelectPattern(Operator):
item_parent = item.parent
if item_parent is not None:
item_parent.select_tail = True
+ elif is_pbone:
+ item.select = True
else:
item.select_set(True)
More information about the Bf-blender-cvs
mailing list