svn merge -r 12937:13095 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / src / vpaint.c
index ac7ad0fa5fb800b7292670cff45d49a8bb3b2e11..615a9566b974f4ff47cd5e7f269c06b0e3d1efe2 100644 (file)
@@ -64,6 +64,7 @@
 
 #include "BKE_armature.h"
 #include "BKE_DerivedMesh.h"
+#include "BKE_cloth.h"
 #include "BKE_customdata.h"
 #include "BKE_depsgraph.h"
 #include "BKE_deform.h"
@@ -1347,6 +1348,11 @@ void weight_paint(void)
        /* this flag is event for softbody to refresh weightpaint values */
        if(ob->soft) ob->softflag |= OB_SB_REDO;
        
+       // same goes for cloth
+       if(modifiers_isClothEnabled(ob)) {
+               cloth_free_modifier(modifiers_isClothEnabled(ob));
+       }       
+       
        BIF_undo_push("Weight Paint");
        allqueue(REDRAWVIEW3D, 0);
 }