Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editfont.c
| Show First 20 Lines • Show All 430 Lines • ▼ Show 20 Lines | static void txt_add_object(bContext *C, TextLine *firstline, int totline, const float offset[3]) | ||||
| struct TextLine *tmp; | struct TextLine *tmp; | ||||
| int nchars = 0, nbytes = 0; | int nchars = 0, nbytes = 0; | ||||
| char *s; | char *s; | ||||
| int a; | int a; | ||||
| float rot[3] = {0.f, 0.f, 0.f}; | float rot[3] = {0.f, 0.f, 0.f}; | ||||
| CTX_data_eval_ctx(C, &eval_ctx); | CTX_data_eval_ctx(C, &eval_ctx); | ||||
| obedit = BKE_object_add(bmain, scene, view_layer, OB_FONT, NULL); | obedit = BKE_object_add(bmain, scene, view_layer, CTX_wm_workspace(C), OB_FONT, NULL); | ||||
| base = view_layer->basact; | base = view_layer->basact; | ||||
| /* seems to assume view align ? TODO - look into this, could be an operator option */ | /* seems to assume view align ? TODO - look into this, could be an operator option */ | ||||
| ED_object_base_init_transform(C, base, NULL, rot); | ED_object_base_init_transform(C, base, NULL, rot); | ||||
| BKE_object_where_is_calc(&eval_ctx, scene, obedit); | BKE_object_where_is_calc(&eval_ctx, scene, obedit); | ||||
| add_v3_v3(obedit->loc, offset); | add_v3_v3(obedit->loc, offset); | ||||
| ▲ Show 20 Lines • Show All 1,481 Lines • Show Last 20 Lines | |||||