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:
authorDalai Felinto <dfelinto@gmail.com>2017-01-10 19:56:29 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-01-10 19:56:31 +0300
commita771249d7d72530e2e82334f8fa25b888cfb6b31 (patch)
tree13ba079088414a8057d8b1c09e06e04c121a8b30 /source/blender/editors/curve/editfont.c
parent143c869bd0cbefceccd757320f4fe84ac5e67be0 (diff)
Add new objects and some Base > ObjectBase convertion
New objects are properly added to the correct collection, and are synced into the correct collections.
Diffstat (limited to 'source/blender/editors/curve/editfont.c')
-rw-r--r--source/blender/editors/curve/editfont.c7
1 files changed, 4 insertions, 3 deletions
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);