Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-05-15 12:35:39 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-15 18:20:02 +0300
commit361bc2bc507fc187c205781130df9fed11907455 (patch)
treebb30a4b172574e361d37f4827e74ca435aa46778 /source/blender/draw/intern/draw_manager.c
parentf25be56bc785b76c9ee19c8e67e76c7c21ea117b (diff)
Particle edit: Make visibility check to be per-particle system
This way we can see other particle systems while combing another one.
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 25c1940627b..8f7097a8bc0 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -36,6 +36,8 @@
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
+#include "BKE_particle.h"
+#include "BKE_pointcache.h"
#include "BKE_workspace.h"
#include "draw_manager.h"
@@ -219,13 +221,20 @@ int DRW_object_is_paint_mode(const Object *ob)
return false;
}
-bool DRW_check_particles_visible_within_active_context(Object *object)
+bool DRW_check_psys_visible_within_active_context(
+ Object *object,
+ struct ParticleSystem *psys)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
if (object == draw_ctx->object_edit) {
return false;
}
- return (object->mode != OB_MODE_PARTICLE_EDIT);
+ if (object->mode == OB_MODE_PARTICLE_EDIT) {
+ if (psys_in_edit_mode(draw_ctx->depsgraph, psys)) {
+ return false;
+ }
+ }
+ return true;
}
/** \} */