diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-06-22 11:32:50 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-06-22 11:48:41 +0300 |
commit | 7773a8ad0482a3069f82b3321b3c492b1f2e5059 (patch) | |
tree | 67ed46aff28589fec25cd5ef8dc2b6bca44a472b /source/blender/blenloader/intern/versioning_280.c | |
parent | f1824507e2b73859ede1c2e850d05795f10da6bb (diff) |
Indicate to users when manual conversion of Eevee materials is needed
We now shows a report error when user opens a file that need fixing.
It's fine(ish) to not do doversion. It's not fine to not communicate that.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 9379c605fe8..664f1e07f71 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -50,6 +50,7 @@ #include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_node.h" +#include "BKE_report.h" #include "BKE_scene.h" #include "BKE_workspace.h" @@ -425,19 +426,26 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) /* Eevee shader nodes renamed because of the output node system. * Note that a new output node is not being added here, because it would be overkill * to handle this case in lib_verify_nodetree. */ + bool error = false; FOREACH_NODETREE(main, ntree, id) { if (ntree->type == NTREE_SHADER) { for (bNode *node = ntree->nodes.first; node; node = node->next) { if (node->type == SH_NODE_EEVEE_METALLIC && STREQ(node->idname, "ShaderNodeOutputMetallic")) { BLI_strncpy(node->idname, "ShaderNodeEeveeMetallic", sizeof(node->idname)); + error = true; } if (node->type == SH_NODE_EEVEE_SPECULAR && STREQ(node->idname, "ShaderNodeOutputSpecular")) { BLI_strncpy(node->idname, "ShaderNodeEeveeSpecular", sizeof(node->idname)); + error = true; } } } } FOREACH_NODETREE_END + if (error) { + BKE_report(fd->reports, RPT_ERROR, "Eevee material conversion problem. Error in console"); + printf("You need to connect Eevee Metallic and Specular shader nodes to new material output nodes.\n"); + } } } } |