diff options
Diffstat (limited to 'source/blender/editors/curve/editcurve_paint.c')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 7632f1b1e64..1e91e2f48fc 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -148,7 +148,7 @@ static void stroke_elem_pressure_set(const struct CurveDrawData *cdd, const float adjust = stroke_elem_radius_from_pressure(cdd, pressure) - stroke_elem_radius_from_pressure(cdd, selem->pressure); madd_v3_v3fl(selem->location_local, selem->normal_local, adjust); - mul_v3_m4v3(selem->location_world, cdd->vc.obedit->obmat, selem->location_local); + mul_v3_m4v3(selem->location_world, cdd->vc.obedit->object_to_world, selem->location_local); } selem->pressure = pressure; } @@ -249,7 +249,7 @@ static bool stroke_elem_project_fallback(const struct CurveDrawData *cdd, if (!is_zero_v3(r_normal_world)) { copy_v3_v3(r_normal_local, r_normal_world); - mul_transposed_mat3_m4_v3(cdd->vc.obedit->obmat, r_normal_local); + mul_transposed_mat3_m4_v3(cdd->vc.obedit->object_to_world, r_normal_local); normalize_v3(r_normal_local); } else { @@ -367,7 +367,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), /* scale to edit-mode space */ GPU_matrix_push(); - GPU_matrix_mul(obedit->obmat); + GPU_matrix_mul(obedit->object_to_world); BLI_mempool_iternew(cdd->stroke_elem_pool, &iter); for (selem = BLI_mempool_iterstep(&iter); selem; selem = BLI_mempool_iterstep(&iter)) { @@ -445,7 +445,7 @@ static void curve_draw_event_add(wmOperator *op, const wmEvent *event) struct CurveDrawData *cdd = op->customdata; Object *obedit = cdd->vc.obedit; - invert_m4_m4(obedit->imat, obedit->obmat); + invert_m4_m4(obedit->imat, obedit->object_to_world); struct StrokeElem *selem = BLI_mempool_calloc(cdd->stroke_elem_pool); @@ -758,7 +758,7 @@ static int curve_draw_exec(bContext *C, wmOperator *op) int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool); const bool is_3d = (cu->flag & CU_3D) != 0; - invert_m4_m4(obedit->imat, obedit->obmat); + invert_m4_m4(obedit->imat, obedit->object_to_world); if (BLI_mempool_len(cdd->stroke_elem_pool) == 0) { curve_draw_stroke_from_operator(op); @@ -1073,8 +1073,8 @@ static int curve_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event) if (CU_IS_2D(cu)) { /* 2D overrides other options */ - plane_co = obedit->obmat[3]; - plane_no = obedit->obmat[2]; + plane_co = obedit->object_to_world[3]; + plane_no = obedit->object_to_world[2]; cdd->project.use_plane = true; } else { |