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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-08-01 17:00:37 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-08-01 17:01:50 +0300
commit895201808c5714f82a86a059c7c533edb6c9b2fe (patch)
treec7c72ae64bbd22373846e4cb52449b18aaf3f834 /source/blender/blenloader
parent21c039f6ef3fb10c0439b096ed7e89d59e3997b3 (diff)
Fix T66040: Make Data Transfer' Mix Factor multiply with vgroup weights when given, instead of ignoring it.
Brings behavior of those options in line with the VGroup editing modifiers ones e.g.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c16
1 files changed, 16 insertions, 0 deletions
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. */
}