diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-20 05:43:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-20 05:50:24 +0300 |
commit | 92c5b12df6f7a6651c7a2cdd16df3f06aa1c1b4f (patch) | |
tree | efc9d9991e5a04b1d0b7c39f078820c417434ac4 /release/scripts/startup | |
parent | 874af5301cdf761f846966f4d7f22bd06adb1e56 (diff) |
Fix T75074: Select Hierarchy error, when object is not on view layer
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index 09a98100796..cf91cd3c961 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -194,7 +194,7 @@ class SelectHierarchy(Operator): for obj in selected_objects: parent = obj.parent - if parent: + if parent and parent.visible_get(): if obj_act == obj: act_new = parent @@ -202,12 +202,13 @@ class SelectHierarchy(Operator): else: for obj in selected_objects: - select_new.extend(obj.children) + select_new.extend([child for child in obj.children if child.visible_get()]) if select_new: select_new.sort(key=lambda obj_iter: obj_iter.name) act_new = select_new[0] + # don't edit any object settings above this if select_new: if not self.extend: |