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:
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 59d78f13ccb..1cd80327b42 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1682,11 +1682,12 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob
if ((found == false) && (add)) {
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- Base *base = BASACT, *newbase = NULL;
+ SceneLayer *sl = CTX_data_scene_layer(C);
+ BaseLegacy *base = BASACT, *newbase = NULL;
Object *obt;
/* add new target object */
- obt = BKE_object_add(bmain, scene, OB_EMPTY, NULL);
+ obt = BKE_object_add(bmain, scene, sl, OB_EMPTY, NULL);
/* set layers OK */
newbase = BASACT;
@@ -1709,7 +1710,7 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob
/* restore, BKE_object_add sets active */
BASACT = base;
- base->flag |= SELECT;
+ base->flag_legacy |= SELECT;
/* make our new target the new object */
*tar_ob = obt;