Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curve.c
| Show First 20 Lines • Show All 326 Lines • ▼ Show 20 Lines | IDTypeInfo IDType_ID_CU = { | ||||
| .blend_read_lib = curve_blend_read_lib, | .blend_read_lib = curve_blend_read_lib, | ||||
| .blend_read_expand = curve_blend_read_expand, | .blend_read_expand = curve_blend_read_expand, | ||||
| .blend_read_undo_preserve = NULL, | .blend_read_undo_preserve = NULL, | ||||
| .lib_override_apply_post = NULL, | .lib_override_apply_post = NULL, | ||||
| }; | }; | ||||
| static int cu_isectLL(const float v1[3], | |||||
| const float v2[3], | |||||
| const float v3[3], | |||||
| const float v4[3], | |||||
| short cox, | |||||
| short coy, | |||||
| float *lambda, | |||||
| float *mu, | |||||
| float vec[3]); | |||||
| /* frees editcurve entirely */ | /* frees editcurve entirely */ | ||||
| void BKE_curve_editfont_free(Curve *cu) | void BKE_curve_editfont_free(Curve *cu) | ||||
| { | { | ||||
| if (cu->editfont) { | if (cu->editfont) { | ||||
| EditFont *ef = cu->editfont; | EditFont *ef = cu->editfont; | ||||
| if (ef->textbuf) { | if (ef->textbuf) { | ||||
| MEM_freeN(ef->textbuf); | MEM_freeN(ef->textbuf); | ||||
| ▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | |||||
| void BKE_curve_texspace_ensure(Curve *cu) | void BKE_curve_texspace_ensure(Curve *cu) | ||||
| { | { | ||||
| if ((cu->texflag & CU_AUTOSPACE) && !(cu->texflag & CU_AUTOSPACE_EVALUATED)) { | if ((cu->texflag & CU_AUTOSPACE) && !(cu->texflag & CU_AUTOSPACE_EVALUATED)) { | ||||
| BKE_curve_texspace_calc(cu); | BKE_curve_texspace_calc(cu); | ||||
| } | } | ||||
| } | } | ||||
| void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_size[3]) | |||||
| { | |||||
| BKE_curve_texspace_ensure(cu); | |||||
| if (r_loc) { | |||||
| copy_v3_v3(r_loc, cu->loc); | |||||
| } | |||||
| if (r_size) { | |||||
| copy_v3_v3(r_size, cu->size); | |||||
| } | |||||
| } | |||||
| bool BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3]) | bool BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3]) | ||||
| { | { | ||||
| int tot = 0; | int tot = 0; | ||||
| LISTBASE_FOREACH (Nurb *, nu, nurb) { | LISTBASE_FOREACH (Nurb *, nu, nurb) { | ||||
| int tot_nu; | int tot_nu; | ||||
| if (nu->type == CU_BEZIER) { | if (nu->type == CU_BEZIER) { | ||||
| tot_nu = nu->pntsu; | tot_nu = nu->pntsu; | ||||
| ▲ Show 20 Lines • Show All 5,052 Lines • Show Last 20 Lines | |||||