[Bf-blender-cvs] [43c6ba9eedd] blender2.8: Draw manager: Add support for cached particle edit paths
Sergey Sharybin
noreply at git.blender.org
Wed May 9 10:35:16 CEST 2018
Commit: 43c6ba9eeddc7fbe3875b73e4ae74920f4afd10b
Author: Sergey Sharybin
Date: Tue May 8 16:57:08 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB43c6ba9eeddc7fbe3875b73e4ae74920f4afd10b
Draw manager: Add support for cached particle edit paths
Before it was only supporting hair strand paths editing.
===================================================================
M source/blender/draw/intern/draw_cache_impl_particles.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
index 2d9e12e8cb5..0ee30fc957d 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -174,6 +174,10 @@ static void ensure_seg_pt_count(ParticleSystem *psys, ParticleBatchCache *cache)
if (psys->edit != NULL && psys->edit->pathcache != NULL) {
count_cache_segment_keys(
psys->edit->pathcache, psys->totpart, cache);
+ }
+ else if (psys->pointcache != NULL && psys->pointcache->edit != NULL) {
+ count_cache_segment_keys(
+ psys->pointcache->edit->pathcache, psys->totpart, cache);
} else {
if (psys->pathcache &&
(!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
@@ -435,14 +439,26 @@ static void particle_batch_cache_ensure_pos_and_seg(ParticleSystem *psys,
}
if (psys->edit != NULL && psys->edit->pathcache != NULL) {
+ /* Edit mode strands for hair editing. */
curr_point = particle_batch_cache_fill_segments(
psys, psmd, psys->edit->pathcache, PARTICLE_SOURCE_PARENT,
0, 0, psys->totpart,
num_uv_layers, mtfaces, uv_id, &parent_uvs,
&elb, &attr_id, cache);
}
+ else if (psys->pointcache != NULL && psys->pointcache->edit != NULL) {
+ /* Edit mode for particle paths. */
+ curr_point = particle_batch_cache_fill_segments(
+ psys, psmd, psys->pointcache->edit->pathcache,
+ PARTICLE_SOURCE_PARENT,
+ 0, 0, psys->totpart,
+ num_uv_layers, mtfaces, uv_id, &parent_uvs,
+ &elb, &attr_id, cache);
+ }
else {
- if (psys->pathcache && (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) {
+ if ((psys->pathcache != NULL) &&
+ (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
+ {
curr_point = particle_batch_cache_fill_segments(
psys, psmd, psys->pathcache, PARTICLE_SOURCE_PARENT,
0, 0, psys->totpart,
More information about the Bf-blender-cvs
mailing list