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 13:44:55 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-15 18:20:02 +0300
commitf4fd1f1f4bf709fa3b95c4408ec3f9beb83ff9a9 (patch)
treeca0203a4b3c9426343d981670fd64c66fad5a59c /source/blender/draw/modes/particle_mode.c
parente83cee73eba8b327cf9875684a6d77bf26ac4942 (diff)
Particle edit: Move cache update to particle batch cache implementation
The idea is to allow "regular" strands to update edit cache and hence get the final update strands.
Diffstat (limited to 'source/blender/draw/modes/particle_mode.c')
-rw-r--r--source/blender/draw/modes/particle_mode.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/source/blender/draw/modes/particle_mode.c b/source/blender/draw/modes/particle_mode.c
index 49e7d24c113..39af98d7165 100644
--- a/source/blender/draw/modes/particle_mode.c
+++ b/source/blender/draw/modes/particle_mode.c
@@ -139,32 +139,6 @@ static void particle_cache_init(void *vedata)
DRW_shgroup_uniform_float(stl->g_data->tip_points_group, "outlineWidth", &outline_width, 1);
}
-static void draw_update_ptcache_edit(Object *object_eval,
- ParticleSystem *psys,
- PTCacheEdit *edit)
-{
- if (edit->psys == NULL) {
- return;
- }
- /* NOTE: Get flag from particle system coming from drawing object.
- * this is where depsgraph will be setting flags to.
- */
- const DRWContextState *draw_ctx = DRW_context_state_get();
- Scene *scene_orig = (Scene *)DEG_get_original_id(&draw_ctx->scene->id);
- Object *object_orig = DEG_get_original_object(object_eval);
- if (psys->flag & PSYS_HAIR_UPDATED) {
- PE_update_object(draw_ctx->depsgraph, scene_orig, object_orig, 0);
- }
- if (edit->pathcache == NULL) {
- Depsgraph *depsgraph = draw_ctx->depsgraph;
- psys_cache_edit_paths(depsgraph,
- scene_orig, object_orig,
- edit,
- DEG_get_ctime(depsgraph),
- DEG_get_mode(depsgraph) == DAG_EVAL_RENDER);
- }
-}
-
static void particle_edit_cache_populate(void *vedata,
Object *object,
ParticleSystem *psys,
@@ -172,7 +146,6 @@ static void particle_edit_cache_populate(void *vedata,
{
PARTICLE_StorageList *stl = ((PARTICLE_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
- draw_update_ptcache_edit(object, psys, edit);
ParticleEditSettings *pset = PE_settings(draw_ctx->scene);
{
struct Gwn_Batch *strands =