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/blenkernel | |
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/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_layer.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index 98fb59814fa..cc6c43c51f6 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -68,7 +68,6 @@ struct ViewLayer *BKE_view_layer_find_from_collection(const struct Scene *scene, struct Base *BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob); void BKE_view_layer_base_deselect_all(struct ViewLayer *view_layer); -void BKE_view_layer_base_select(struct Base *selbase); void BKE_view_layer_base_select_and_set_active(struct ViewLayer *view_layer, struct Base *selbase); void BKE_view_layer_copy_data(struct Scene *scene_dst, diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 6f43a57584d..3cb4462aaf2 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -345,19 +345,14 @@ void BKE_view_layer_base_deselect_all(ViewLayer *view_layer) } } -void BKE_view_layer_base_select(Base *selbase) +void BKE_view_layer_base_select_and_set_active(struct ViewLayer *view_layer, Base *selbase) { + view_layer->basact = selbase; if ((selbase->flag & BASE_SELECTABLE) != 0) { selbase->flag |= BASE_SELECTED; } } -void BKE_view_layer_base_select_and_set_active(struct ViewLayer *view_layer, Base *selbase) -{ - view_layer->basact = selbase; - BKE_view_layer_base_select(selbase); -} - /**************************** Copy View Layer and Layer Collections ***********************/ static void layer_collections_copy_data(ViewLayer *view_layer_dst, |