Bug fix #2016
authorTon Roosendaal <ton@blender.org>
Tue, 14 Dec 2004 18:12:30 +0000 (18:12 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 14 Dec 2004 18:12:30 +0000 (18:12 +0000)
Particles added to mesh being deformed with Armature crashes.
Bug introduced with 2.33, particle collisions... leon added some fancy
updates for actions and armature displists there, which are highly
disputable. I left it in, because I didn't see it was actually new.

Note: particles added while updating mesh with armatures is not supported,
it will shoot particles from original location.
What does work, is static particles.

source/blender/blenkernel/intern/effect.c

index ed2936af03453239d484d1cb0a4e482de1f0cf1b..988d9abfd9b3e69b199b77d7c36ace1ca6f361af 100644 (file)
@@ -1131,7 +1131,6 @@ void build_particle_system(Object *ob)
        MVert *mvert;
        MTex *mtexmove=0;
        Material *ma;
-       int armature_parent;
        float framelenont, ftime, dtime, force[3], imat[3][3], vec[3];
        float fac, prevobmat[4][4], sfraont, co[3];
        int deform=0, a, cur, cfraont, cfralast, totpart;
@@ -1199,16 +1198,9 @@ void build_particle_system(Object *ob)
        /* set it all at first frame */
        G.scene->r.cfra= cfralast= (int)floor(ftime);
        par= ob;
-       armature_parent = 0;
        while(par) {
                /* do_ob_ipo(par); */
                do_ob_key(par);
-               /* Just checking whether theres an armature in the */
-               /* parent chain of the emitter, so we know whether */
-               /* to recalculate the armatures */
-               if(par->type==OB_ARMATURE) {
-                       armature_parent = 1;
-               }
                par= par->parent;
        }
        
@@ -1274,12 +1266,6 @@ void build_particle_system(Object *ob)
        
                                /* added later: blur? */
                                bsystem_time(ob, ob->parent, (float)G.scene->r.cfra, 0.0);
-                               
-                               /* Update the armatures */
-                               if (armature_parent) {
-                                       do_all_actions();
-                                       rebuild_all_armature_displists();
-                               }
 
                                par= ob;
                                while(par) {
@@ -1355,13 +1341,6 @@ void build_particle_system(Object *ob)
        G.scene->r.framelen= framelenont;
        give_mesh_mvert(0, 0, 0, 0,paf->seed);
 
-       /*Restore armature settings*/
-       if((paf->flag & PAF_STATIC)==0) {
-               if (armature_parent) {
-                       do_all_actions();
-                       rebuild_all_armature_displists();
-               }
-       }
        /* put hierarchy back */
        par= ob;
        while(par) {