diff options
author | Germano Cavalcante <mano-wii> | 2022-07-22 05:44:39 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-07-22 16:01:27 +0300 |
commit | 98bf714b37c1f1b05a162b6ffdaca367b312de1f (patch) | |
tree | d4d1d70efa67275ab3bd77c28040db8607cbe851 /source/blender/editors/transform/transform_convert_mesh_uv.c | |
parent | 185eeeaaac01bf24930f7e8b25c96f9fa9503073 (diff) |
Refactor: arrange transform convert functions in 'TransConvertTypeInfo'
Simplify the transform code by bundling the TransData creation, Data
recalculation, and special updates into a single struct.
So similar functions and parameters can be accessed without special
type checks.
Differential Revision: https://developer.blender.org/D15494
Diffstat (limited to 'source/blender/editors/transform/transform_convert_mesh_uv.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_mesh_uv.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_convert_mesh_uv.c b/source/blender/editors/transform/transform_convert_mesh_uv.c index bb550909407..d95bc7b976f 100644 --- a/source/blender/editors/transform/transform_convert_mesh_uv.c +++ b/source/blender/editors/transform/transform_convert_mesh_uv.c @@ -234,7 +234,7 @@ static void uv_set_connectivity_distance(BMesh *bm, float *dists, const float as MEM_freeN(dists_prev); } -void createTransUVs(bContext *C, TransInfo *t) +static void createTransUVs(bContext *C, TransInfo *t) { SpaceImage *sima = CTX_wm_space_image(C); Scene *scene = t->scene; @@ -446,7 +446,7 @@ static void flushTransUVs(TransInfo *t) } } -void recalcData_uv(TransInfo *t) +static void recalcData_uv(TransInfo *t) { SpaceImage *sima = t->area->spacedata.first; @@ -463,3 +463,10 @@ void recalcData_uv(TransInfo *t) } /** \} */ + +TransConvertTypeInfo TransConvertType_MeshUV = { + /* flags */ (T_EDIT | T_POINTS | T_2D_EDIT), + /* createTransData */ createTransUVs, + /* recalcData */ recalcData_uv, + /* special_aftertrans_update */ NULL, +}; |