Minor particle system fixes:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 14 May 2008 13:30:36 +0000 (13:30 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 14 May 2008 13:30:36 +0000 (13:30 +0000)
- Changed some tooltips.
- Refresh with reactors and shared particle settings.
- Copying of child particles.

source/blender/blenkernel/intern/object.c
source/blender/src/buttons_object.c
source/blender/src/buttons_shading.c
source/blender/src/header_view3d.c

index a2a7894e3ce024af8f219327ce5abcb4bcd641af..ab1bc5a2265be412d4ebea2c5fc2f0ea4ad2d9ed 100644 (file)
@@ -1056,6 +1056,7 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
        psysn->effectors.first= psysn->effectors.last= 0;
        
        psysn->pathcachebufs.first = psysn->pathcachebufs.last = NULL;
+       psysn->childcachebufs.first = psysn->childcachebufs.last = NULL;
        psysn->reactevents.first = psysn->reactevents.last = NULL;
        psysn->renderdata = NULL;
        
index 8fcd55fd6f954ed1852aa0630f2d7b53579c687d..13b4bf01850a9e09e0937fe12bbea874df86eba1 100644 (file)
@@ -3013,9 +3013,14 @@ void do_effects_panels(unsigned short event)
        case B_PART_INIT_CHILD:
        case B_PART_RECALC_CHILD:
                if(psys) {
+                       Base *base;
+                       Object *bob;
+                       ParticleSystem *bpsys;
+                       int flush;
+
                        nr=0;
-                       for(psys=ob->particlesystem.first; psys; psys=psys->next){
-                               if(ELEM(psys->part->draw_as,PART_DRAW_OB,PART_DRAW_GR))
+                       for(bpsys=ob->particlesystem.first; bpsys; bpsys=bpsys->next){
+                               if(ELEM(bpsys->part->draw_as,PART_DRAW_OB,PART_DRAW_GR))
                                        nr++;
                        }
                        if(nr)
@@ -3023,6 +3028,21 @@ void do_effects_panels(unsigned short event)
                        else
                                ob->transflag &= ~OB_DUPLIPARTS;
 
+                       if(psys->part->type==PART_REACTOR)
+                               if(psys->target_ob)
+                                       DAG_object_flush_update(G.scene, psys->target_ob, OB_RECALC_DATA);
+
+                       for(base = G.scene->base.first; base; base= base->next) {
+                               bob= base->object;
+                               flush= 0;
+                               for(bpsys=bob->particlesystem.first; bpsys; bpsys=bpsys->next)
+                                       if(bpsys->part==psys->part)
+                                               flush= 1;
+
+                               if(flush)
+                                       DAG_object_flush_update(G.scene, bob, OB_RECALC_DATA);
+                       }
+
                        DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                        allqueue(REDRAWBUTSOBJECT, 0);
index a4ddd55d2f0dff60c61ccfa98107cd28851c9dbf..c68475088060af846162d08be9927503d0d19e2e 100644 (file)
@@ -3288,7 +3288,7 @@ static void material_panel_map_to(Object *ob, Material *ma, int from_nodes)
                        //uiButSetFunc(but, particle_recalc_material, ma, NULL);
                but=uiDefButBitS(block, TOG3, MAP_PA_KINK, B_MAT_PARTICLE, "Kink",      70,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the kink of child particles");
                        //uiButSetFunc(but, particle_recalc_material, ma, NULL);
-               but=uiDefButBitS(block, TOG3, MAP_PA_LENGTH, B_MAT_PARTICLE, "Length",130,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the length of particles");
+               but=uiDefButBitS(block, TOG3, MAP_PA_LENGTH, B_MAT_PARTICLE, "Length",130,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the length of child particles");
                        //uiButSetFunc(but, particle_recalc_material, ma, NULL);
                but=uiDefButBitS(block, TOG3, MAP_PA_CLUMP, B_MAT_PARTICLE, "Clump",    190,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the clump of child particles");
                        //uiButSetFunc(but, particle_recalc_material, ma, NULL);
index 26f5f3af888bb835dd13dbe1b4b11d31980b4d65..dfd62a67cddd94b56e09f5da3ea631b2d2fbc854 100644 (file)
@@ -5727,11 +5727,11 @@ void view3d_buttons(void)
                }
                else if(G.f & G_PARTICLEEDIT) {
                        uiBlockBeginAlign(block);
-                       uiDefIconButBitS(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Path edit mode (Ctrl Tab 1)");
+                       uiDefIconButBitS(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Path edit mode");
                        xco+= XIC;
-                       uiDefIconButBitS(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Point select mode (Ctrl Tab 2)");
+                       uiDefIconButBitS(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Point select mode");
                        xco+= XIC;
-                       uiDefIconButBitS(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Tip select mode (Ctrl Tab 3)");
+                       uiDefIconButBitS(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Tip select mode");
                        xco+= XIC;
                        uiBlockEndAlign(block);
                        if(G.vd->drawtype > OB_WIRE) {