diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_blender_version.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 3 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 3 |
4 files changed, 21 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 062e185eb23..ced9f4a3153 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -27,7 +27,7 @@ * \note Use #STRINGIFY() rather than defining with quotes. */ #define BLENDER_VERSION 281 -#define BLENDER_SUBVERSION 0 +#define BLENDER_SUBVERSION 1 /** Several breakages with 280, e.g. collections vs layers. */ #define BLENDER_MINVERSION 280 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 1fb29745dba..3c7ac5d8d2e 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -4756,7 +4756,8 @@ void CustomData_data_transfer(const MeshPairRemap *me_remap, for (i = 0; i < totelem; i++, data_dst = POINTER_OFFSET(data_dst, data_step), mapit++) { const int sources_num = mapit->sources_num; - const float mix_factor = laymap->mix_weights ? laymap->mix_weights[i] : laymap->mix_factor; + const float mix_factor = laymap->mix_factor * + (laymap->mix_weights ? laymap->mix_weights[i] : 1.0f); int j; if (!sources_num) { diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index cb2b64957f0..1a79b7c9b5a 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3533,6 +3533,22 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 281, 1)) { + LISTBASE_FOREACH (Object *, ob, &bmain->objects) { + for (ModifierData *md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_DataTransfer) { + /* Now datatransfer's mix factor is multiplied with weights when any, + * instead of being ignored, + * we need to take care of that to keep 'old' files compatible. */ + DataTransferModifierData *dtmd = (DataTransferModifierData *)md; + if (dtmd->defgrp_name[0] != '\0') { + dtmd->mix_factor = 1.0f; + } + } + } + } + } + { /* Versioning code until next subversion bump goes here. */ } diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index a04e0e6422f..7e1ff01a7c3 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -5668,7 +5668,8 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) 0.0f, 1.0f, "Mix Factor", - "Factor to use when applying data to destination (exact behavior depends on mix mode)", + "Factor to use when applying data to destination (exact behavior depends on mix mode, " + "multiplied with weights from vertex group when defined)", 0.0f, 1.0f); RNA_def_property_update(prop, 0, "rna_Modifier_update"); |