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-09 12:14:27 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-09 15:59:48 +0300
commit033c2c71312daf86a148a068a2e20afcb784b3ee (patch)
tree3f1864fde31fc13a6fe99f8f36da3d25d1831700 /source/blender/draw/intern/draw_cache_impl_particles.c
parent65b0d31eb8b5f2b757db1fb72801058fbdd0d58f (diff)
Draw manager: Start using more explicit API for particle edit mode
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_particles.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_particles.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
index 4b69c017ba0..0cc3c001ef2 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -577,3 +577,16 @@ Gwn_Batch *DRW_particles_batch_cache_get_dots(Object *object, ParticleSystem *ps
return cache->hairs;
}
+
+Gwn_Batch *DRW_particles_batch_cache_get_edit_strands(PTCacheEdit* edit)
+{
+ ParticleSystem *psys = edit->psys;
+ ParticleBatchCache *cache = particle_batch_cache_get(psys);
+ if (cache->hairs != NULL) {
+ return cache->hairs;
+ }
+ ensure_seg_pt_count(psys, cache);
+ particle_batch_cache_ensure_pos_and_seg(psys, NULL, cache);
+ cache->hairs = GWN_batch_create(GWN_PRIM_LINE_STRIP, cache->pos, cache->indices);
+ return cache->hairs;
+}