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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-11 12:40:26 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-11 18:06:28 +0300
commit73b9531dcfa34bea4ab8b4f5fc37039786bf809c (patch)
treee1a35f339f45bbcdac9aa83733b2f0faed2e4e3a /source/blender/editors/space_outliner/outliner_select.c
parent0461f45e5e0bcaa8c94265ddbaf442ef7e1b1227 (diff)
Fix incorrect object selection test in outliner and rigid body.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index af1b11b28d2..36fd37e1134 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -941,18 +941,22 @@ static void do_outliner_item_activate_tree_element(
if (extend) {
int sel = BA_SELECT;
- FOREACH_COLLECTION_BASE_RECURSIVE_BEGIN(gr, base)
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(gr, object)
{
- if (base->flag & BASE_SELECTED) {
+ Base *base = BKE_view_layer_base_find(view_layer, object);
+ if (base && (base->flag & BASE_SELECTED)) {
sel = BA_DESELECT;
break;
}
}
- FOREACH_COLLECTION_BASE_RECURSIVE_END
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(gr, object)
{
- ED_object_base_select(BKE_view_layer_base_find(view_layer, object), sel);
+ Base *base = BKE_view_layer_base_find(view_layer, object);
+ if (base) {
+ ED_object_base_select(base, sel);
+ }
}
FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
}