diff options
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 28ba2b04b6f..6aefabe780d 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -2313,12 +2313,13 @@ static bool get_new_constraint_target( /* if still not found, add a new empty to act as a target (if allowed) */ if ((found == false) && (add)) { Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); Base *base = view_layer->basact; Object *obt; /* add new target object */ - obt = BKE_object_add(bmain, view_layer, OB_EMPTY, NULL); + obt = BKE_object_add(bmain, scene, view_layer, OB_EMPTY, NULL); /* transform cent to global coords for loc */ if (pchanact) { |