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:
authorCampbell Barton <campbell@blender.org>2022-08-26 05:51:46 +0300
committerCampbell Barton <campbell@blender.org>2022-08-26 05:51:46 +0300
commit6fc7b37583a2fa0815ae50b8c604f823d863cab1 (patch)
treebbb02a7a513e43a634739c93904f5b23ad913ae0 /source/blender/modifiers/intern
parenta3e1a9e2aace26a71c2698cd96ce4086db25e94d (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r--source/blender/modifiers/intern/MOD_shapekey.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_shapekey.c b/source/blender/modifiers/intern/MOD_shapekey.c
index 56dd1fc50f8..3649a108ed4 100644
--- a/source/blender/modifiers/intern/MOD_shapekey.c
+++ b/source/blender/modifiers/intern/MOD_shapekey.c
@@ -49,11 +49,11 @@ static void deformMatrices(ModifierData *md,
{
Key *key = BKE_key_from_object(ctx->object);
KeyBlock *kb = BKE_keyblock_from_object(ctx->object);
- float scale[3][3];
(void)vertexCos; /* unused */
if (kb && kb->totelem == verts_num && kb != key->refkey) {
+ float scale[3][3];
int a;
if (ctx->object->shapeflag & OB_SHAPE_LOCK) {
@@ -95,15 +95,14 @@ static void deformMatricesEM(ModifierData *UNUSED(md),
{
Key *key = BKE_key_from_object(ctx->object);
KeyBlock *kb = BKE_keyblock_from_object(ctx->object);
- float scale[3][3];
(void)vertexCos; /* unused */
if (kb && kb->totelem == verts_num && kb != key->refkey) {
- int a;
+ float scale[3][3];
scale_m3_fl(scale, kb->curval);
- for (a = 0; a < verts_num; a++) {
+ for (int a = 0; a < verts_num; a++) {
copy_m3_m3(defMats[a], scale);
}
}