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-02-05 17:01:30 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-08 15:54:54 +0300
commitbe60b3b23984ff7a9b973a37800522e4b5e7918f (patch)
tree4bef4e93dc7c23e44d4fa0a7871f95f3a6e37f9a /source/blender/editors/transform/transform_generics.c
parentbc56c127704f937d7fdfee082975bc0fa01f4b52 (diff)
Transform: Grid snap target refactor
The code takes many turns to get a suitable "target" for the snap to grid. Perhaps there were other reasons awaited for `transformCenter_from_type` and `TransCenterData center_cache[5]`. But since nothing is defined, it is better to simplify the code. No user functional changes
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r--source/blender/editors/transform/transform_generics.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index e181593d28a..d230670993c 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1184,13 +1184,6 @@ void calculateCenter(TransInfo *t)
}
calculateCenterLocal(t, t->center_global);
- /* avoid calculating again */
- {
- TransCenterData *cd = &t->center_cache[t->around];
- copy_v3_v3(cd->global, t->center_global);
- cd->is_set = true;
- }
-
calculateCenter2D(t);
/* For panning from the camera-view. */
@@ -1237,23 +1230,6 @@ void calculateCenter(TransInfo *t)
}
}
-BLI_STATIC_ASSERT(ARRAY_SIZE(((TransInfo *)NULL)->center_cache) == (V3D_AROUND_ACTIVE + 1),
- "test size");
-
-/**
- * Lazy initialize transform center data, when we need to access center values from other types.
- */
-const TransCenterData *transformCenter_from_type(TransInfo *t, int around)
-{
- BLI_assert(around <= V3D_AROUND_ACTIVE);
- TransCenterData *cd = &t->center_cache[around];
- if (cd->is_set == false) {
- calculateCenter_FromAround(t, around, cd->global);
- cd->is_set = true;
- }
- return cd;
-}
-
void calculatePropRatio(TransInfo *t)
{
int i;