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:
authorLucas Veber <lucky3>2020-03-10 14:47:43 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-03-10 14:49:08 +0300
commit915998111bc45336247a7aaf91eaa1dcd5e8881b (patch)
tree3f28ac772f105748e38e89fceb423122207ddb33 /source/blender/makesdna
parent982b498c22a3f4c7dc9c8ec8827d24724e16d9c6 (diff)
Modifiers: Corrective Smooth modifier, new Scale parameter
When scaling the root bone of a rig to apply a global scale, the corrective smooth modifier results in wrong deformation due to incorrect scaling. The delta calculations are not taking into account any scale value. To fix it, a scale property is added to the modifier, allowing to set manually the scale value for the deltas by simply multiplying the vectors by this value. There is a similar implementation in Maya's Delta Mush deformer. This property can be for example driven by the scale of the root bone of the rig, to dynamically update when the animator scale this bone. Reviewed By: brecht, sybren Differential Revision: https://developer.blender.org/D6622
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 36d21b28b1f..042cf7e874f 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1684,10 +1684,10 @@ typedef struct CorrectiveSmoothDeltaCache {
/* Value of settings when creating the cache.
* These are used to check if the cache should be recomputed. */
- float lambda;
+ float lambda, scale;
short repeat, flag;
char smooth_type, rest_source;
- char _pad[2];
+ char _pad[6];
} CorrectiveSmoothDeltaCache;
typedef struct CorrectiveSmoothModifierData {
@@ -1700,10 +1700,10 @@ typedef struct CorrectiveSmoothModifierData {
/* note: -1 is used to bind */
unsigned int bind_coords_num;
- float lambda;
+ float lambda, scale;
short repeat, flag;
char smooth_type, rest_source;
- char _pad[2];
+ char _pad[6];
/** MAX_VGROUP_NAME. */
char defgrp_name[64];