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:
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 00f4c49fda9..31e4b659c2f 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -52,6 +52,7 @@
#include "BKE_animsys.h"
#include "BKE_armature.h"
+#include "BKE_attribute.h"
#include "BKE_collection.h"
#include "BKE_colortools.h"
#include "BKE_cryptomatte.h"
@@ -1905,6 +1906,25 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 293, 14)) {
+ 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;
+ }
+ }
+
+ 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;
+ }
+ }
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
@@ -1916,12 +1936,5 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/
{
/* Keep this block, even when empty. */
-
- 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;
- }
- }
}
}