diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-06-06 22:41:17 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-06-06 22:42:47 +0300 |
commit | ac7feaed3d4d80c60557b3c4af5eee65bef2e4ec (patch) | |
tree | 944ee4502ec40b8c18ab4e2fb66036276336998c /source/blender/blenloader/intern | |
parent | c8e9e6dda0f9b5bd0a2d07995f8cc0fcc8d334a1 (diff) |
EditNormal modifier: add some 'maximum angle' limit.
Allows to avoid generating flipped faces when using extreme normal modifications.
Related to T48576.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 0ea4078a5cb..b7b6ace3c1a 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1189,9 +1189,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } - } - { for (Camera *camera = main->camera.first; camera != NULL; camera = camera->id.next) { if (camera->stereo.pole_merge_angle_from == 0.0f && camera->stereo.pole_merge_angle_to == 0.0f) @@ -1200,5 +1198,19 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) camera->stereo.pole_merge_angle_to = DEG2RAD(75.0f); } } + + if (!DNA_struct_elem_find(fd->filesdna, "NormalEditModifierData", "float", "mix_limit")) { + Object *ob; + + for (ob = main->object.first; ob; ob = ob->id.next) { + ModifierData *md; + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_NormalEdit) { + NormalEditModifierData *nemd = (NormalEditModifierData *)md; + nemd->mix_limit = DEG2RADF(180.0f); + } + } + } + } } } |