[Bf-blender-cvs] [e57ba1daf52] blender2.8: Particle edit: Allow children to be visible in edit mode

Sergey Sharybin noreply at git.blender.org
Tue May 15 17:21:41 CEST 2018


Commit: e57ba1daf52c441d9c306def5fe076a8d0ba4af1
Author: Sergey Sharybin
Date:   Tue May 15 12:46:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe57ba1daf52c441d9c306def5fe076a8d0ba4af1

Particle edit: Allow children to be visible in edit mode

Follows tool settings, tested without copy-on-write.

Enabling copy-on-write still needs verification and likely some fixing.

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

M	source/blender/draw/intern/draw_manager.c

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

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 8f7097a8bc0..8c7435bdd1f 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -226,12 +226,23 @@ bool DRW_check_psys_visible_within_active_context(
         struct ParticleSystem *psys)
 {
 	const DRWContextState *draw_ctx = DRW_context_state_get();
+	const Scene *scene = draw_ctx->scene;
 	if (object == draw_ctx->object_edit) {
 		return false;
 	}
+	const ParticleSettings *part = psys->part;
+	const ParticleEditSettings *pset = &scene->toolsettings->particle;
 	if (object->mode == OB_MODE_PARTICLE_EDIT) {
 		if (psys_in_edit_mode(draw_ctx->depsgraph, psys)) {
-			return false;
+			if ((pset->flag & PE_DRAW_PART) == 0) {
+				return false;
+			}
+			if ((part->childtype == 0) &&
+			    (psys->flag & PSYS_HAIR_DYNAMICS &&
+			     psys->pointcache->flag & PTCACHE_BAKED)==0)
+			{
+				return false;
+			}
 		}
 	}
 	return true;



More information about the Bf-blender-cvs mailing list