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:
Diffstat (limited to 'source/blender/src/transform_generics.c')
-rw-r--r--source/blender/src/transform_generics.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c
index b24f9bea48d..1f6d8ecf7af 100644
--- a/source/blender/src/transform_generics.c
+++ b/source/blender/src/transform_generics.c
@@ -74,6 +74,7 @@
#include "BKE_action.h"
#include "BKE_anim.h"
#include "BKE_armature.h"
+#include "BKE_cloth.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
@@ -467,8 +468,15 @@ void recalcData(TransInfo *t)
/* bah, softbody exception... recalcdata doesnt reset */
for(base= FIRSTBASE; base; base= base->next) {
if(base->object->recalc & OB_RECALC_DATA)
+ {
if(modifiers_isSoftbodyEnabled(base->object)) {
base->object->softflag |= OB_SB_REDO;
+ }
+ else if(modifiers_isClothEnabled(base->object)) {
+ ClothModifierData *clmd = (ClothModifierData *) modifiers_findByType(base->object, eModifierType_Cloth);
+ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
+ }
+
}
}
}
@@ -504,10 +512,16 @@ void recalcData(TransInfo *t)
}
}
- /* softbody exception */
- if(modifiers_isSoftbodyEnabled(ob)) {
- if(ob->recalc & OB_RECALC_DATA)
- ob->softflag |= OB_SB_REDO;
+ /* softbody & cloth exception */
+ if(ob->recalc & OB_RECALC_DATA)
+ {
+ if(modifiers_isSoftbodyEnabled(ob)) {
+ ob->softflag |= OB_SB_REDO;
+ }
+ else if(modifiers_isClothEnabled(ob)) {
+ ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
+ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
+ }
}
/* proxy exception */