From 6fc7b37583a2fa0815ae50b8c604f823d863cab1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Aug 2022 12:51:46 +1000 Subject: Cleanup: reduce variable scope --- source/blender/modifiers/intern/MOD_shapekey.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/modifiers') 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); } } -- cgit v1.2.3