diff options
Diffstat (limited to 'source/blender/editors/object/object_hook.c')
-rw-r--r-- | source/blender/editors/object/object_hook.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index b3f62f3fc0f..077891f92ed 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -484,12 +484,13 @@ static bool hook_op_edit_poll(bContext *C) return false; } -static Object *add_hook_object_new(Main *bmain, ViewLayer *view_layer, View3D *v3d, Object *obedit) +static Object *add_hook_object_new( + Main *bmain, const Scene *scene, ViewLayer *view_layer, View3D *v3d, Object *obedit) { Base *basedit; Object *ob; - ob = BKE_object_add(bmain, view_layer, OB_EMPTY, NULL); + ob = BKE_object_add(bmain, scene, view_layer, OB_EMPTY, NULL); basedit = BKE_view_layer_base_find(view_layer, obedit); BLI_assert(view_layer->basact->object == ob); @@ -532,7 +533,7 @@ static int add_hook_object(const bContext *C, if (mode == OBJECT_ADDHOOK_NEWOB && !ob) { - ob = add_hook_object_new(bmain, view_layer, v3d, obedit); + ob = add_hook_object_new(bmain, scene, view_layer, v3d, obedit); /* transform cent to global coords for loc */ mul_v3_m4v3(ob->loc, obedit->obmat, cent); |