Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2019-01-02 15:22:00 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-01-02 15:22:00 +0300
commit6fdfa556678ec88231f21bd444e9f628a36008ce (patch)
tree8b5e0c43882d0ace5206af01c8d87b4803d7c28b /release/scripts/startup/bl_operators
parentf15205b93f56e454b76d5a222fdb9a9665b99907 (diff)
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.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r--release/scripts/startup/bl_operators/object.py6
1 files changed, 5 insertions, 1 deletions
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)