Bugfix where copy-protection of several modifiers like collision, softbody and partic...
authorDaniel Genrich <daniel.genrich@gmx.net>
Sun, 21 Sep 2008 22:47:50 +0000 (22:47 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Sun, 21 Sep 2008 22:47:50 +0000 (22:47 +0000)
source/blender/src/editobject.c

index 29d7b52487f3a594f1591aa8fda7cd00aa36eb87..29e37f45e86e701eeea5253b4b75efbfaefd42ef 100644 (file)
@@ -3306,6 +3306,9 @@ static void copymenu_modifiers(Object *ob)
                ModifierTypeInfo *mti = modifierType_getInfo(i);
 
                if(ELEM3(i, eModifierType_Hook, eModifierType_Softbody, eModifierType_ParticleInstance)) continue;
+               
+               if(i == eModifierType_Collision)
+                       continue;
 
                if (    (mti->flags&eModifierTypeFlag_AcceptsCVs) || 
                                (ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) {
@@ -3329,11 +3332,14 @@ static void copymenu_modifiers(Object *ob)
                                                object_free_modifiers(base->object);
 
                                                for (md=ob->modifiers.first; md; md=md->next) {
-                                                       if (md->type!=eModifierType_Hook) {
-                                                               ModifierData *nmd = modifier_new(md->type);
-                                                               modifier_copyData(md, nmd);
-                                                               BLI_addtail(&base->object->modifiers, nmd);
-                                                       }
+                                                       if(ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_ParticleInstance)) continue;
+               
+                                                       if(md->type == eModifierType_Collision)
+                                                               continue;
+                                                       
+                                                       ModifierData *nmd = modifier_new(md->type);
+                                                       modifier_copyData(md, nmd);
+                                                       BLI_addtail(&base->object->modifiers, nmd);
                                                }
 
                                                copy_object_particlesystems(base->object, ob);