[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14006] trunk/blender/source/blender: Fix for bug [#8465] particle children for emitter particles doesn't render

Janne Karhu jhkarh at utu.fi
Sat Mar 8 00:08:18 CET 2008


Revision: 14006
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14006
Author:   jhk
Date:     2008-03-08 00:08:15 +0100 (Sat, 08 Mar 2008)

Log Message:
-----------
Fix for bug [#8465] particle children for emitter particles doesn't render
-cached step didn't react to rendering and create child particles
-now emitter particle children can use the render amount too

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	2008-03-07 22:39:54 UTC (rev 14005)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c	2008-03-07 23:08:15 UTC (rev 14006)
@@ -4407,6 +4407,12 @@
 		else
 			pa->flag &= ~PARS_NO_DISP;
 	}
+
+	/* make sure that children are up to date */
+	if(psys->part->childtype && psys->totchild != get_psys_tot_child(psys)) {
+		alloc_particles(ob, psys, psys->totpart);
+		distribute_particles(ob, psys, PART_FROM_CHILD);
+	}
 }
 /* Calculates the next state for all particles of the system */
 /* In particles code most fra-ending are frames, time-ending are fra*timestep (seconds)*/

Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c	2008-03-07 22:39:54 UTC (rev 14005)
+++ trunk/blender/source/blender/src/buttons_object.c	2008-03-07 23:08:15 UTC (rev 14006)
@@ -3995,8 +3995,7 @@
 	buty -= buth/2;
 	
 	uiDefButI(block, NUM, B_PART_ALLOC_CHILD, "Amount:", butx,(buty-=buth),butw,buth, &part->child_nbr, 0.0, MAX_PART_CHILDREN, 0, 0, "Amount of children/parent");
-	if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED))
-		uiDefButI(block, NUM, B_DIFF, "Render Amount:", butx,(buty-=buth),butw,buth, &part->ren_child_nbr, 0.0, MAX_PART_CHILDREN, 0, 0, "Amount of children/parent for rendering");
+	uiDefButI(block, NUM, B_DIFF, "Render Amount:", butx,(buty-=buth),butw,buth, &part->ren_child_nbr, 0.0, MAX_PART_CHILDREN, 0, 0, "Amount of children/parent for rendering");
 
 	if(part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES) {
 		uiDefButF(block, NUMSLI, B_PART_DISTR_CHILD, "VParents:",		butx,(buty-=buth),butw,buth, &part->parents, 0.0, 1.0, 1, 3, "Relative amount of virtual parents");





More information about the Bf-blender-cvs mailing list