From a771249d7d72530e2e82334f8fa25b888cfb6b31 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 10 Jan 2017 17:56:29 +0100 Subject: Add new objects and some Base > ObjectBase convertion New objects are properly added to the correct collection, and are synced into the correct collections. --- source/blender/editors/curve/editfont.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/curve/editfont.c') diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 57e731874b4..aee236fa3ff 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -420,17 +420,18 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, const { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); + SceneLayer *sl = CTX_data_scene_layer(C); Curve *cu; Object *obedit; - Base *base; + ObjectBase *base; struct TextLine *tmp; int nchars = 0, nbytes = 0; char *s; int a; float rot[3] = {0.f, 0.f, 0.f}; - obedit = BKE_object_add(bmain, scene, OB_FONT, NULL); - base = scene->basact; + obedit = BKE_object_add(bmain, scene, sl, OB_FONT, NULL); + base = sl->basact; /* seems to assume view align ? TODO - look into this, could be an operator option */ ED_object_base_init_transform(C, base, NULL, rot); -- cgit v1.2.3