[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13033] trunk/blender/source/blender: - particle size changes weren't updated without a cache clear

Janne Karhu jhkarh at utu.fi
Fri Dec 28 17:13:55 CET 2007


Revision: 13033
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13033
Author:   jhk
Date:     2007-12-28 17:13:52 +0100 (Fri, 28 Dec 2007)

Log Message:
-----------
- particle size changes weren't updated without a cache clear
- protecting the particle cache now actually protects the cache a bit better and not just prevent the clear button from working
- cache was being used for "none" physics.
- a bad tooltip for "reactor initial velocity"

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/particle_system.c
    trunk/blender/source/blender/src/buttons_object.c

Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c	2007-12-28 13:11:27 UTC (rev 13032)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c	2007-12-28 16:13:52 UTC (rev 13033)
@@ -4381,10 +4381,10 @@
 			return;
 		}
 	}
-	else {	
-		if(psys->recalc)
+	else if(part->phystype != PART_PHYS_NO) {	/* cache shouldn't be used for none physics */
+		if(psys->recalc && (psys->flag & PSYS_PROTECT_CACHE) == 0)
 			clear_particles_from_cache(ob,psys,(int)cfra);
-		else if(get_particles_from_cache(ob, psys, (int)cfra)){
+		else if(get_particles_from_cache(ob, psys, (int)cfra)) {
 			cached_step(ob,psmd,psys,cfra,vg_size);
 			psys->cfra=cfra;
 			psys->recalc = 0;

Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c	2007-12-28 13:11:27 UTC (rev 13032)
+++ trunk/blender/source/blender/src/buttons_object.c	2007-12-28 16:13:52 UTC (rev 13033)
@@ -3821,9 +3821,9 @@
 
 	uiDefButI(block, NUM, B_PART_DISTR, "Seed:",				butx,(buty-=buth),butw,buth, &psys->seed, 0.0, 255.0, 1, 0, "Set an offset in the random table");
 
-	event=(part->flag&PART_SIZEMASS)?B_PART_RECALC:B_PART_REDRAW;
-	uiDefButF(block, NUM, event, "Size:",	butx,(buty-=2*buth),butw,buth, &part->size, 0.01, 100, 10, 1, "The size of the particles");
-	uiDefButF(block, NUM, event, "Rand:",	butx,(buty-=buth),butw,buth, &part->randsize, 0.0, 2.0, 10, 1, "Give the particle size a random variation");
+	/* size changes must create a recalc event always so that sizes are updated properly */
+	uiDefButF(block, NUM, B_PART_RECALC, "Size:",	butx,(buty-=2*buth),butw,buth, &part->size, 0.01, 100, 10, 1, "The size of the particles");
+	uiDefButF(block, NUM, B_PART_RECALC, "Rand:",	butx,(buty-=buth),butw,buth, &part->randsize, 0.0, 2.0, 10, 1, "Give the particle size a random variation");
 
 	uiDefButBitI(block, TOG, PART_SIZEMASS, B_PART_RECALC, "Mass from size",	 butx,(buty-=buth),butw,buth, &part->flag, 0, 0, 0, 0, "Multiply mass with particle size");
 	uiDefButF(block, NUM, B_PART_RECALC, "Mass:",	butx,(buty-=buth),butw,buth, &part->mass, 0.01, 100, 10, 1, "Specify the mass of the particles");
@@ -4122,7 +4122,7 @@
 		uiDefButF(block, NUM, B_PART_RECALC, "Random:",		butx,(buty-=buth*4/5),butw,buth*4/5, &part->randfac, 0.0, 200.0, 1, 3, "Give the starting speed a random variation");
 		if(part->type==PART_REACTOR) {
 			uiDefButF(block, NUM, B_PART_RECALC, "Particle:",		butx,(buty-=buth*4/5),butw,buth*4/5, &part->partfac, -10.0, 10.0, 1, 3, "Let the target particle give the particle a starting speed");
-			uiDefButF(block, NUM, B_PART_RECALC, "Reactor:",		butx,(buty-=buth*4/5),butw,buth*4/5, &part->reactfac, -10.0, 10.0, 1, 3, "Let the vector from target particle give the particle a starting speed");
+			uiDefButF(block, NUM, B_PART_RECALC, "Reactor:",		butx,(buty-=buth*4/5),butw,buth*4/5, &part->reactfac, -10.0, 10.0, 1, 3, "Let the vector away from the target particles location give the particle a starting speed");
 		}
 		else {
 			uiDefButF(block, NUM, B_PART_RECALC, "Tan:",		butx,(buty-=buth*4/5),butw,buth*4/5, &part->tanfac, -200.0, 200.0, 1, 3, "Let the surface tangent give the particle a starting speed");





More information about the Bf-blender-cvs mailing list