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:
authorJoseph Eagar <joeedh@gmail.com>2022-04-03 21:04:00 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-04-03 21:04:00 +0300
commitd6fc7221c83548a3d03baeed4104423bb2d1b553 (patch)
tree58d6dc8e55996d1ca7b51454bcaaab7344f0b2c3 /source/blender/blenloader
parent25c09de0a16100d348909ee0fa5300293ecb757f (diff)
temp-sculpt-colors: move data transfer versioning into versioning_300.c
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index c675bc97d82..faa1b6bd9d7 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -45,6 +45,7 @@
#include "BKE_attribute.h"
#include "BKE_collection.h"
#include "BKE_curve.h"
+#include "BKE_data_transfer.h"
#include "BKE_deform.h"
#include "BKE_fcurve.h"
#include "BKE_fcurve_driver.h"
@@ -2489,13 +2490,11 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
-
- /* Rebuild active/render color attribute references. */
if (!MAIN_VERSION_ATLEAST(bmain, 302, 8)) {
+ /* While vertex-colors were experimental the smear tool became corrupt due
+ * to bugs in the wm_toolsystem API (auto-creation of sculpt brushes
+ * was broken). Go through and reset all smear brushes. */
LISTBASE_FOREACH (Brush *, br, &bmain->brushes) {
- /* While vertex-colors were experimental the smear tool became corrupt due
- * to bugs in the wm_toolsystem API (auto-creation of sculpt brushes
- * was broken) so its values must be reset. */
if (br->sculpt_tool == SCULPT_TOOL_SMEAR) {
br->alpha = 1.0f;
br->spacing = 5;
@@ -2505,6 +2504,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ /* Rebuild active/render color attribute references. */
LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) {
for (int step = 0; step < 2; step++) {
CustomDataLayer *actlayer = NULL;
@@ -2537,6 +2537,25 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /* Update data transfer modifiers */
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
+ if (md->type == eModifierType_DataTransfer) {
+ DataTransferModifierData *dtmd = (DataTransferModifierData *)md;
+
+ for (int i = 0; i < DT_MULTILAYER_INDEX_MAX; i++) {
+ if (dtmd->layers_select_src[i] == 0) {
+ dtmd->layers_select_src[i] = DT_LAYERS_ALL_SRC;
+ }
+
+ if (dtmd->layers_select_dst[i] == 0) {
+ dtmd->layers_select_dst[i] = DT_LAYERS_NAME_DST;
+ }
+ }
+ }
+ }
+ }
}
/**