[Bf-blender-cvs] [e1fae3cbee3] temp_bmesh_multires: Fix do_versions check
Joseph Eagar
noreply at git.blender.org
Sun Apr 11 21:34:25 CEST 2021
Commit: e1fae3cbee3c6c0e09812e5227c8f872650e57bf
Author: Joseph Eagar
Date: Sun Apr 11 12:34:15 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rBe1fae3cbee3c6c0e09812e5227c8f872650e57bf
Fix do_versions check
===================================================================
M source/blender/blenloader/intern/versioning_290.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 4188995cfcb..c361fa4ce19 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1961,6 +1961,27 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 293, 17)) {
+ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
+ if (brush->dyntopo.detail_range == 0.0f) {
+ Brush defbrush = *brush;
+
+ BKE_brush_sculpt_reset(&defbrush);
+ brush->dyntopo = defbrush.dyntopo;
+ }
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(bmain, 293, 18)) {
+ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
+ if (brush->sculpt_tool == SCULPT_TOOL_SIMPLIFY) {
+ brush->dyntopo.inherit = ((1 << 17) - 1) &
+ ~(DYNTOPO_INHERIT_ALL | DYNTOPO_SUBDIVIDE | DYNTOPO_COLLAPSE);
+ brush->dyntopo.flag |= DYNTOPO_COLLAPSE | DYNTOPO_SUBDIVIDE;
+ }
+ }
+ }
+
if (!MAIN_VERSION_ATLEAST(bmain, 293, 14)) {
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
ToolSettings *ts = scene->toolsettings;
@@ -1976,29 +1997,20 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
- if (brush->dyntopo.detail_range == 0.0f) {
- Brush defbrush = *brush;
-
- BKE_brush_sculpt_reset(&defbrush);
- brush->dyntopo = defbrush.dyntopo;
- }
-
- LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
- if (ntree->type == NTREE_GEOMETRY) {
- LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
- if (node->type == GEO_NODE_ATTRIBUTE_FILL) {
- node->custom2 = ATTR_DOMAIN_AUTO;
- }
+ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
+ if (ntree->type == NTREE_GEOMETRY) {
+ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
+ if (node->type == GEO_NODE_ATTRIBUTE_FILL) {
+ node->custom2 = ATTR_DOMAIN_AUTO;
}
}
}
+ }
- if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "diff_fac")) {
- LISTBASE_FOREACH (Light *, light, &bmain->lights) {
- light->diff_fac = 1.0f;
- light->volume_fac = 1.0f;
- }
+ if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "diff_fac")) {
+ LISTBASE_FOREACH (Light *, light, &bmain->lights) {
+ light->diff_fac = 1.0f;
+ light->volume_fac = 1.0f;
}
}
}
More information about the Bf-blender-cvs
mailing list