diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-05-08 12:16:11 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-05-08 12:16:11 +0300 |
commit | ef88d436c37c25f442b5ba6c11e9ee00336978d6 (patch) | |
tree | 352bb6c2e91d5ff5d5e1cb48653c224da022ea23 /source/blender/blenloader/intern | |
parent | 0335a0507ce2e0e8dae941ebb7593f5175b54175 (diff) | |
parent | 548102fcb8d2b8661233af1af3cc85a7946c263a (diff) |
Merge branch 'alembic' into gooseberry
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 3fc76197be1..ac250588932 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -36,6 +36,7 @@ #define DNA_DEPRECATED_ALLOW #include "DNA_brush_types.h" +#include "DNA_cache_library_types.h" #include "DNA_camera_types.h" #include "DNA_cloth_types.h" #include "DNA_constraint_types.h" @@ -56,6 +57,7 @@ #include "DNA_genfile.h" +#include "BKE_colortools.h" #include "BKE_main.h" #include "BKE_modifier.h" #include "BKE_node.h" @@ -1034,4 +1036,24 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + if (!DNA_struct_elem_find(fd->filesdna, "HairSimParams", "CurveMapping", "bend_stiffness_mapping")) { + CacheLibrary *cachelib; + for (cachelib = main->cache_library.first; cachelib; cachelib = cachelib->id.next) { + CacheModifier *md; + for (md = cachelib->modifiers.first; md; md = md->next) { + if (md->type == eCacheModifierType_HairSimulation) { + HairSimCacheModifier *hsmd = (HairSimCacheModifier *)md; + { + CurveMapping *cm = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); + cm->cm[0].curve[0].x = 0.0f; + cm->cm[0].curve[0].y = 1.0f; + cm->cm[0].curve[1].x = 1.0f; + cm->cm[0].curve[1].y = 1.0f; + hsmd->sim_params.bend_stiffness_mapping = cm; + } + } + } + } + } } |