Weight Proximity: fix value overlap between Normalize and Invert VGroup.
The flags overlapped ever since normalize was added, so this requires versioning to copy the flag value. Differential Revision: https://developer.blender.org/D14165
This commit is contained in:
parent
38ae311706
commit
82ff0fa586
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 6
|
||||
#define BLENDER_FILE_SUBVERSION 7
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and show a warning if the file
|
||||
|
|
|
@ -2549,6 +2549,20 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
}
|
||||
}
|
||||
|
||||
if (!MAIN_VERSION_ATLEAST(bmain, 301, 7)) {
|
||||
/* Duplicate value for two flags that mistakenly had the same numeric value. */
|
||||
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
|
||||
LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
|
||||
if (md->type == eModifierType_WeightVGProximity) {
|
||||
WeightVGProximityModifierData *wpmd = (WeightVGProximityModifierData *)md;
|
||||
if (wpmd->proximity_flags & MOD_WVG_PROXIMITY_INVERT_VGROUP_MASK) {
|
||||
wpmd->proximity_flags |= MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Versioning code until next subversion bump goes here.
|
||||
*
|
||||
|
|
|
@ -1708,7 +1708,7 @@ enum {
|
|||
MOD_WVG_PROXIMITY_GEOM_FACES = (1 << 2),
|
||||
MOD_WVG_PROXIMITY_INVERT_VGROUP_MASK = (1 << 3),
|
||||
MOD_WVG_PROXIMITY_INVERT_FALLOFF = (1 << 4),
|
||||
MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE = (1 << 3),
|
||||
MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE = (1 << 5),
|
||||
};
|
||||
|
||||
/* Defines common to all WeightVG modifiers. */
|
||||
|
|
Loading…
Reference in New Issue