diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-13 11:51:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-13 11:51:10 +0300 |
commit | 46151a6a69aa7461fbfd03561aea2cfd5eecbc61 (patch) | |
tree | 5909b7502bbdea05b93fc0d8d67d88511bf9211b /source/blender/blenloader | |
parent | 67fa545ed06ef9a5afd1da2591fa8cc60ed808fb (diff) |
Fix issue with some files having non-unique modifier names
Originally the files are coming from ancient early-2.4x epoch, but in
theory such setups might have been re-saved multiple times already with
more recent blender versions.
So the verisoning code is applied on all the files, including very
recent ones.
Bumped subversion, because this check si not really cheap.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 23bf291b981..1afdc348c24 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -51,6 +51,7 @@ #include "DNA_genfile.h" #include "BKE_main.h" +#include "BKE_modifier.h" #include "BKE_node.h" #include "BKE_screen.h" @@ -602,4 +603,18 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + if (!MAIN_VERSION_ATLEAST(main, 273, 8)) { + Object *ob; + for (ob = main->object.first; ob != NULL; ob = ob->id.next) { + ModifierData *md; + for (md = ob->modifiers.last; md != NULL; md = md->prev) { + if (modifier_unique_name(&ob->modifiers, md)) { + printf("Warning: Object '%s' had several modifiers with the " + "same name, renamed one of them to '%s'.\n", + ob->id.name + 2, md->name); + } + } + } + } } |