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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-05-03 19:24:43 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-05-03 19:24:43 +0300
commitba878a08803b78aa821ccf9f2089efebd02ae15f (patch)
treea61d412bdcdfbeb3874b493613c286ae1ec1f4d2 /source/blender/blenloader/intern
parented81c38c975fae00f1ef11c0ea48a4e52a7feaf8 (diff)
Main shape key implementation for cached strand data.
This includes storage of the shape keys in a `Key` instance in the modifier data, and accompanying operators for adding, removing, moving, etc. shape keys, as well as the necessary UI code.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c10
-rw-r--r--source/blender/blenloader/intern/writefile.c6
2 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 62ac46166d1..1057f840d22 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2005,6 +2005,16 @@ static void lib_link_cache_modifiers(FileData *fd, CacheLibrary *cachelib)
CacheModifier *md;
for (md = cachelib->modifiers.first; md; md = md->next) {
BKE_cache_modifier_foreachIDLink(cachelib, md, lib_link_cache_modifiers_cb, fd);
+
+ /* special cases */
+ switch (md->type) {
+ case eCacheModifierType_StrandsKey: {
+ StrandsKeyCacheModifier *skmd = (StrandsKeyCacheModifier *)md;
+ /* Key is a local ID block, not handled by foreachIDLink */
+ skmd->key = newlibadr(fd, cachelib->id.lib, skmd->key);
+ break;
+ }
+ }
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 6210eee919a..74eed665472 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3548,6 +3548,12 @@ static void write_cache_modifiers(WriteData *wd, CacheLibrary *cachelib)
write_curvemapping(wd, hsmd->sim_params.goal_stiffness_mapping);
break;
}
+ case eCacheModifierType_StrandsKey: {
+ StrandsKeyCacheModifier *skmd = (StrandsKeyCacheModifier *)md;
+ /* Key is a local ID block */
+ writestruct(wd, DATA, "Key", 1, skmd->key);
+ break;
+ }
}
}
}