[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25925] trunk/blender/source/blender/ editors/physics/particle_edit.c: particle edit

Campbell Barton ideasman42 at gmail.com
Tue Jan 12 14:20:49 CET 2010


Revision: 25925
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25925
Author:   campbellbarton
Date:     2010-01-12 14:20:49 +0100 (Tue, 12 Jan 2010)

Log Message:
-----------
particle edit
the emitter field wasnt recalculated on entering on editmode.
this meant you could use the puff brush in particle edit, move mesh verts, go back into particle edit... And the mesh data from the previous mesh would still be used.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/physics/particle_edit.c

Modified: trunk/blender/source/blender/editors/physics/particle_edit.c
===================================================================
--- trunk/blender/source/blender/editors/physics/particle_edit.c	2010-01-12 12:08:23 UTC (rev 25924)
+++ trunk/blender/source/blender/editors/physics/particle_edit.c	2010-01-12 13:20:49 UTC (rev 25925)
@@ -88,6 +88,7 @@
 
 static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys);
 static void PTCacheUndo_clear(PTCacheEdit *edit);
+static void recalc_emitter_field(Object *ob, ParticleSystem *psys);
 
 #define KEY_K					PTCacheEditKey *key; int k
 #define POINT_P					PTCacheEditPoint *point; int p
@@ -265,8 +266,13 @@
 		}
 	}
 
-	if(edit)
+	if(edit) {
 		edit->pid = *pid;
+		
+		/* mesh may have changed since last entering editmode.
+		 * note, this may have run before if the edit data was just created, so could avoid this and speed up a little */
+		recalc_emitter_field(ob, edit->psys);
+	}
 
 	BLI_freelistN(&pidlist);
 





More information about the Bf-blender-cvs mailing list