From 66684bdff30fdf3fffa02c71c0118b7d714e9b0e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 5 Jul 2019 16:13:24 +1000 Subject: Cleanup: redundant scene access, duplicate flag clear --- source/blender/makesrna/intern/rna_sculpt_paint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c') diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 221d4375970..ac41736451a 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -230,11 +230,12 @@ static void rna_ParticleEdit_redo(bContext *C, PointerRNA *UNUSED(ptr)) BKE_particle_batch_cache_dirty_tag(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL); psys_free_path_cache(edit->psys, edit); - DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } static void rna_ParticleEdit_update(bContext *C, PointerRNA *UNUSED(ptr)) { + Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob = OBACT(view_layer); @@ -243,7 +244,7 @@ static void rna_ParticleEdit_update(bContext *C, PointerRNA *UNUSED(ptr)) } /* Sync tool setting changes from original to evaluated scenes. */ - DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) -- cgit v1.2.3