[Bf-blender-cvs] [5d71399c041] blender2.8: Depsgraph: Remove particle edit code from evaluation

Sergey Sharybin noreply at git.blender.org
Wed May 9 16:22:54 CEST 2018


Commit: 5d71399c04112107d730e4f8943ee67fd5e34e9b
Author: Sergey Sharybin
Date:   Wed May 9 15:44:49 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB5d71399c04112107d730e4f8943ee67fd5e34e9b

Depsgraph: Remove particle edit code from evaluation

Everything seems to be working without this, which makes since there is no
evaluation-time edit code in master. The only tricky part here would be that
this means we might want to ensure edit structure exists from inside particle
mode in draw manager.

Other point for not having this code in evaluation is that it's possible to
have same object evaluated in different contexts at the same time, and since
edit structures are supposed to be in original object we might run into
threading conflict.

===================================================================

M	source/blender/blenkernel/intern/particle_system.c

===================================================================

diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index ab307ebdbe8..bc3218723ac 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -96,9 +96,6 @@
 
 #include "RE_shader_ext.h"
 
-/* FIXME: BAD LEVEL CALL. */
-#include "../../editors/include/ED_particle.h"
-
 /* fluid sim particle import */
 #ifdef WITH_MOD_FLUID
 #include "DNA_object_fluidsim_types.h"
@@ -4385,22 +4382,6 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o
 	/* save matrix for duplicators, at rendertime the actual dupliobject's matrix is used so don't update! */
 	invert_m4_m4(psys->imat, ob->obmat);
 
-	if (ob->mode & OB_MODE_PARTICLE_EDIT && ob == OBACT(DEG_get_evaluated_view_layer(depsgraph))) {
-		PTCacheEdit *edit = PE_create_current(depsgraph, scene, ob);
-
-		if (edit && edit->psys == psys) {
-			if (edit->psys && edit->psys->flag & PSYS_HAIR_UPDATED) {
-				PE_update_object(depsgraph, scene, ob, 0);
-			}
-
-			/* create path and child path cache if it doesn't exist already */
-			if (edit->pathcache == NULL) {
-				psys_cache_edit_paths(depsgraph, scene, ob, edit, DEG_get_ctime(depsgraph), DEG_get_mode(depsgraph) == DAG_EVAL_RENDER);
-
-			}
-		}
-	}
-
 	BKE_particle_batch_cache_dirty(psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
 }



More information about the Bf-blender-cvs mailing list