[Bf-blender-cvs] [9454377] master: Fix T36994: Make link modifier fails (soft body)
Campbell Barton
noreply at git.blender.org
Tue Jun 2 12:24:26 CEST 2015
Commit: 9454377c71f48ab5f10b523e002041c31324fbae
Author: Campbell Barton
Date: Tue Jun 2 20:23:01 2015 +1000
Branches: master
https://developer.blender.org/rB9454377c71f48ab5f10b523e002041c31324fbae
Fix T36994: Make link modifier fails (soft body)
===================================================================
M source/blender/blenkernel/intern/object.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index c1626ed..939d6ee 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -264,8 +264,6 @@ void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_sr
if (ELEM(md->type,
eModifierType_Hook,
- eModifierType_Softbody,
- eModifierType_ParticleInstance,
eModifierType_Collision))
{
continue;
@@ -273,10 +271,15 @@ void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_sr
if (!BKE_object_support_modifier_type_check(ob_dst, md->type))
continue;
-
- if (md->type == eModifierType_Skin) {
- /* ensure skin-node customdata exists */
- BKE_mesh_ensure_skin_customdata(ob_dst->data);
+
+ switch (md->type) {
+ case eModifierType_Softbody:
+ BKE_object_copy_softbody(ob_dst, ob_src);
+ break;
+ case eModifierType_Skin:
+ /* ensure skin-node customdata exists */
+ BKE_mesh_ensure_skin_customdata(ob_dst->data);
+ break;
}
nmd = modifier_new(md->type);
@@ -293,7 +296,6 @@ void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_sr
}
BKE_object_copy_particlesystems(ob_dst, ob_src);
- BKE_object_copy_softbody(ob_dst, ob_src);
/* TODO: smoke?, cloth? */
}
@@ -1379,6 +1381,7 @@ void BKE_object_copy_particlesystems(Object *ob_dst, const Object *ob_src)
void BKE_object_copy_softbody(Object *ob_dst, const Object *ob_src)
{
if (ob_src->soft) {
+ ob_dst->softflag = ob_src->softflag;
ob_dst->soft = copy_softbody(ob_src->soft, false);
}
}
More information about the Bf-blender-cvs
mailing list