Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-04-24 16:59:37 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-04-24 17:35:05 +0300
commitc2a0ca622b3a3bad46fcb974de4c04e4ff3ec1bf (patch)
tree818df66e3b392949c5966b247330883681ab21dd /source/blender/editors/transform/transform_convert_cursor.c
parent536a2fe7cc4ba86fb45bb538e4c8c0547550c2c3 (diff)
Cleanup: Move transform recaldata functions to their respective files
Diffstat (limited to 'source/blender/editors/transform/transform_convert_cursor.c')
-rw-r--r--source/blender/editors/transform/transform_convert_cursor.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_convert_cursor.c b/source/blender/editors/transform/transform_convert_cursor.c
index 67d85f9610b..1f3eff31205 100644
--- a/source/blender/editors/transform/transform_convert_cursor.c
+++ b/source/blender/editors/transform/transform_convert_cursor.c
@@ -134,3 +134,29 @@ void createTransCursor_view3d(TransInfo *t)
}
/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Recalc Cursor
+ * \{ */
+
+void recalcData_cursor_image(TransInfo *t)
+{
+ TransDataContainer *tc = t->data_container;
+ TransData *td = tc->data;
+ float aspect_inv[2];
+
+ aspect_inv[0] = 1.0f / t->aspect[0];
+ aspect_inv[1] = 1.0f / t->aspect[1];
+
+ td->loc[0] = td->loc[0] * aspect_inv[0];
+ td->loc[1] = td->loc[1] * aspect_inv[1];
+
+ DEG_id_tag_update(&t->scene->id, ID_RECALC_COPY_ON_WRITE);
+}
+
+void recalcData_cursor(TransInfo *t)
+{
+ DEG_id_tag_update(&t->scene->id, ID_RECALC_COPY_ON_WRITE);
+}
+
+/** \} */