diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-02-27 20:04:58 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-02-27 20:04:58 +0300 |
commit | fc9a6642270fdc36b2e72fadec53cb13c4d01e99 (patch) | |
tree | d4480cfdce8bf3e9ae59bdcffaad91a669d0a542 /source/blender/src/editobject.c | |
parent | 9620bccf5b1146e5cc660260a2a4574669644941 (diff) |
Bugfix: Copy Modifiers with particle systems crashed, it didn't copy
the particle systems.
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r-- | source/blender/src/editobject.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index e6edb472fc3..6084ece8c6e 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -3079,7 +3079,7 @@ static void copymenu_modifiers(Object *ob) for (i=eModifierType_None+1; i<NUM_MODIFIER_TYPES; i++) { ModifierTypeInfo *mti = modifierType_getInfo(i); - if (ELEM(i, eModifierType_Hook, eModifierType_Softbody)) continue; + if(ELEM3(i, eModifierType_Hook, eModifierType_Softbody, eModifierType_ParticleInstance)) continue; if ( (mti->flags&eModifierTypeFlag_AcceptsCVs) || (ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) { @@ -3109,6 +3109,9 @@ static void copymenu_modifiers(Object *ob) BLI_addtail(&base->object->modifiers, nmd); } } + + copy_object_particlesystems(base->object, ob); + copy_object_softbody(base->object, ob); } else { /* copy specific types */ ModifierData *md, *mdn; @@ -3132,6 +3135,15 @@ static void copymenu_modifiers(Object *ob) modifier_copyData(md, mdn); } } + + if(event == eModifierType_ParticleSystem) { + object_free_particlesystems(base->object); + copy_object_particlesystems(base->object, ob); + } + else if(event == eModifierType_Softbody) { + object_free_softbody(base->object); + copy_object_softbody(base->object, ob); + } } } else |