diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-11-02 16:41:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-11-02 17:42:23 +0300 |
commit | 38c7fd36ff7a6eb4522a688d38faa086a6313ae6 (patch) | |
tree | ea1136a788b1d3db9d46f9a19900c396e30ce3f1 /source/blender/editors/curve | |
parent | 0fc958a174192b2b25c4187c170ec4a394dc308a (diff) |
Refactor: Rename Object->imat to Object->world_to_object
The goal is to improve clarity and readability, without
introducing big design changes.
Follows the recent obmat to object_to_world refactor: the
similar naming is used, and it is a run-time only rename,
meaning, there is no affect on .blend files.
This patch does not touch the redundant inversions. Those
can be removed in almost (if not all) cases, but it would
be the best to do it as a separate change.
Differential Revision: https://developer.blender.org/D16367
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 4 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 2b6cce25bb7..f9377503630 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -5095,8 +5095,8 @@ static int spin_exec(bContext *C, wmOperator *op) continue; } - invert_m4_m4(obedit->imat, obedit->object_to_world); - mul_m4_v3(obedit->imat, cent); + invert_m4_m4(obedit->world_to_object, obedit->object_to_world); + mul_m4_v3(obedit->world_to_object, cent); if (!ed_editnurb_spin(viewmat, v3d, obedit, axis, cent)) { count_failed += 1; diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 1e91e2f48fc..af3d439dd2e 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -245,7 +245,7 @@ static bool stroke_elem_project_fallback(const struct CurveDrawData *cdd, cdd->vc.v3d, cdd->vc.region, location_fallback_depth, mval_fl, r_location_world); zero_v3(r_normal_local); } - mul_v3_m4v3(r_location_local, cdd->vc.obedit->imat, r_location_world); + mul_v3_m4v3(r_location_local, cdd->vc.obedit->world_to_object, r_location_world); if (!is_zero_v3(r_normal_world)) { copy_v3_v3(r_normal_local, r_normal_world); @@ -304,7 +304,7 @@ static void curve_draw_stroke_from_operator_elem(wmOperator *op, PointerRNA *ite RNA_float_get_array(itemptr, "mouse", selem->mval); RNA_float_get_array(itemptr, "location", selem->location_world); - mul_v3_m4v3(selem->location_local, cdd->vc.obedit->imat, selem->location_world); + mul_v3_m4v3(selem->location_local, cdd->vc.obedit->world_to_object, selem->location_world); selem->pressure = RNA_float_get(itemptr, "pressure"); } @@ -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->object_to_world); + invert_m4_m4(obedit->world_to_object, 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->object_to_world); + invert_m4_m4(obedit->world_to_object, obedit->object_to_world); if (BLI_mempool_len(cdd->stroke_elem_pool) == 0) { curve_draw_stroke_from_operator(op); |