diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-05-06 15:02:29 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-05-06 15:02:29 +0300 |
commit | ebcb8223bd886fd327cddae1394436e10f1f7a73 (patch) | |
tree | ab6f36d914d0144d56c9e461d1c68b8a6c3b7dce /source/blender/blenloader/intern | |
parent | b97214a0ba1615f5a699150736ae3e99986707f4 (diff) | |
parent | af7fe835ffeff094df994f5e3fd75735f0514d8f (diff) |
Merge branch 'alembic' into gooseberry
Conflicts:
source/blender/blenkernel/BKE_key.h
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/key.c
source/blender/editors/object/object_shapekey.c
source/blender/makesdna/DNA_customdata_types.h
source/blender/makesrna/intern/rna_key.c
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ed0dbf0eda9..6342a800abd 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2006,6 +2006,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_us(fd, cachelib->id.lib, skmd->key); + break; + } + } } } @@ -2045,6 +2055,11 @@ static void direct_link_cache_modifiers(FileData *fd, ListBase *modifiers) direct_link_curvemapping(fd, hsmd->sim_params.goal_stiffness_mapping); break; } + case eCacheModifierType_StrandsKey: { + StrandsKeyCacheModifier *skmd = (StrandsKeyCacheModifier *)md; + skmd->edit = NULL; + break; + } } } } @@ -4067,6 +4082,7 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles) psys->edit = NULL; psys->free_edit = NULL; + psys->hairedit = NULL; psys->pathcache = NULL; psys->childcache = NULL; BLI_listbase_clear(&psys->pathcachebufs); @@ -5087,7 +5103,7 @@ static void direct_link_object(FileData *fd, Object *ob) * See [#34776, #42780] for more information. */ if (fd->memfile || (ob->id.flag & (LIB_EXTERN | LIB_INDIRECT))) { - ob->mode &= ~(OB_MODE_EDIT | OB_MODE_PARTICLE_EDIT); + ob->mode &= ~(OB_MODE_EDIT | OB_MODE_PARTICLE_EDIT | OB_MODE_HAIR_EDIT); if (!fd->memfile) { ob->mode &= ~OB_MODE_POSE; } @@ -5426,6 +5442,14 @@ static void lib_link_scene(FileData *fd, Main *main) sce->toolsettings->particle.shape_object = newlibadr(fd, sce->id.lib, sce->toolsettings->particle.shape_object); + { + HairEditSettings *hair_edit = &sce->toolsettings->hair_edit; + if (hair_edit->brush) + hair_edit->brush = newlibadr(fd, sce->id.lib, hair_edit->brush); + if (hair_edit->shape_object) + hair_edit->shape_object = newlibadr(fd, sce->id.lib, hair_edit->shape_object); + } + for (base = sce->base.first; base; base = next) { next = base->next; @@ -5679,7 +5703,8 @@ static void direct_link_scene(FileData *fd, Scene *sce) sce->toolsettings->particle.paintcursor = NULL; sce->toolsettings->particle.scene = NULL; sce->toolsettings->particle.object = NULL; - + sce->toolsettings->hair_edit.paint_cursor = NULL; + /* in rare cases this is needed, see [#33806] */ if (sce->toolsettings->vpaint) { sce->toolsettings->vpaint->vpaint_prev = NULL; |