[Bf-blender-cvs] [d6fc7221c83] temp-sculpt-colors: temp-sculpt-colors: move data transfer versioning into versioning_300.c
Joseph Eagar
noreply at git.blender.org
Sun Apr 3 20:04:39 CEST 2022
Commit: d6fc7221c83548a3d03baeed4104423bb2d1b553
Author: Joseph Eagar
Date: Sun Apr 3 11:04:00 2022 -0700
Branches: temp-sculpt-colors
https://developer.blender.org/rBd6fc7221c83548a3d03baeed4104423bb2d1b553
temp-sculpt-colors: move data transfer versioning into versioning_300.c
===================================================================
M release/datafiles/locale
M release/scripts/addons
M source/blender/blenloader/intern/versioning_300.c
M source/blender/makesdna/DNA_mesh_types.h
M source/blender/modifiers/intern/MOD_datatransfer.c
===================================================================
diff --git a/release/datafiles/locale b/release/datafiles/locale
index 716dc02ec30..30b4ef98b5d 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 716dc02ec30c0810513f7b4adc4ae865ae50c4e6
+Subproject commit 30b4ef98b5d044bf793e105d2e020a9cd8a55a61
diff --git a/release/scripts/addons b/release/scripts/addons
index 787ea78f7fa..d6f0fb5b17f 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 787ea78f7fa6f0373d80ba1247768402df93f8ad
+Subproject commit d6f0fb5b17f00c1c498f9afa8775bf8502b97778
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;
+ }
+ }
+ }
+ }
+ }
}
/**
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index c1d9e3a0dd3..d8a853681fd 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -243,7 +243,6 @@ typedef struct Mesh {
*
* \note This is mainly stored for use in edit-mode.
*/
-
int act_face;
/**
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c
index 1f95a5a89f9..a3b088799cc 100644
--- a/source/blender/modifiers/intern/MOD_datatransfer.c
+++ b/source/blender/modifiers/intern/MOD_datatransfer.c
@@ -473,22 +473,6 @@ static void panelRegister(ARegionType *region_type)
#undef DT_TYPES_AFFECT_MESH
-static void blendRead(struct BlendDataReader *UNUSED(reader), struct ModifierData *md)
-{
- DataTransferModifierData *dtmd = (DataTransferModifierData *)md;
-
- /* Check for uninitialized data from old files. */
- 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;
- }
- }
-}
-
ModifierTypeInfo modifierType_DataTransfer = {
/* name */ "DataTransfer",
/* structName */ "DataTransferModifierData",
@@ -520,5 +504,5 @@ ModifierTypeInfo modifierType_DataTransfer = {
/* freeRuntimeData */ NULL,
/* panelRegister */ panelRegister,
/* blendWrite */ NULL,
- /* blendRead */ blendRead,
+ /* blendRead */ NULL,
};
More information about the Bf-blender-cvs
mailing list