diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-04-23 23:22:27 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-04-30 22:48:07 +0300 |
commit | 088d59c3d379f1a53fd2ee20a4bd569a70bbbd96 (patch) | |
tree | b2d6136fa449b63c89807fba1cc5182993124ea5 /source/blender/editors/object | |
parent | c7452f14c5d0ee3d11e85ca1218938cb641ad31f (diff) |
Refactor: Use object select API - ED_object_base_select
We had a mix of BKE_view_layer_base_select (harmless), and places where
we simply set the BASE_SELECTED flag with no regard to its selectable
state.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 3 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 5b9b4304064..6a587bd6e2a 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1843,7 +1843,7 @@ static bool get_new_constraint_target( /* restore, BKE_object_add sets active */ BASACT(view_layer) = base; - base->flag |= BASE_SELECTED; + ED_object_base_select(base, BA_SELECT); /* make our new target the new object */ *tar_ob = obt; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index a62c0add521..e15d85a7953 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2158,8 +2158,7 @@ static bool make_local_all__instance_indirect_unused(Main *bmain, BKE_collection_object_add(bmain, collection, ob); base = BKE_view_layer_base_find(view_layer, ob); - base->flag |= BASE_SELECTED; - BKE_scene_object_base_flag_sync_from_base(base); + ED_object_base_select(base, BA_SELECT); DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); changed = true; diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index f0508b5f35c..2568db4abe9 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -87,7 +87,7 @@ * \{ */ /** - * simple API for object selection, rather than just using the flag + * Simple API for object selection, rather than just using the flag * this takes into account the 'restrict selection in 3d view' flag. * deselect works always, the restriction just prevents selection * |