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:
authorCody Winchester <CodyWinch>2020-05-26 21:53:38 +0300
committerBastien Montagne <bastien@blender.org>2020-05-26 21:56:27 +0300
commitde257b6366455ba6a3604c0830a92245df11f7bc (patch)
tree239c022c52cbb655ce2116fddb151c3f55549ed6 /source/blender/blenloader
parent00674c12cc0f08254e5643ad18120b2e9e710a94 (diff)
Modifiers: Add normalize weights option to vertex weight modifiers
Original patch by Cody Winchester (@CodyWinch), several fixes and cleanup by Bastien Montagne (@mont29). Differential revision: https://developer.blender.org/D7656
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 0a3a1a2f881..6574c983b09 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -26,6 +26,8 @@
#include "DNA_brush_types.h"
#include "DNA_genfile.h"
#include "DNA_gpencil_modifier_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "BKE_collection.h"
@@ -241,6 +243,18 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 290, 4)) {
+ /* Clear old deprecated bitflag from edit weights modifiers, we now use it for something else.
+ */
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
+ if (md->type == eModifierType_WeightVGEdit) {
+ md->flag &= ~MOD_WVG_EDIT_WEIGHTS_NORMALIZE;
+ }
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*