Commit: 66684bdff30fdf3fffa02c71c0118b7d714e9b0e
Author: Campbell Barton
Date:   Fri Jul 5 16:13:24 2019 +1000
Branches: master
https://developer.blender.org/rB66684bdff30fdf3fffa02c71c0118b7d714e9b0e

Cleanup: redundant scene access, duplicate flag clear

===================================================================

M       source/blender/editors/object/object_select.c
M       source/blender/makesrna/intern/rna_layer.c
M       source/blender/makesrna/intern/rna_sculpt_paint.c

===================================================================

diff --git a/source/blender/editors/object/object_select.c 
b/source/blender/editors/object/object_select.c
index afdda8d6b7f..fcba69f7e5d 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -130,7 +130,7 @@ void ED_object_base_activate(bContext *C, Base *base)
 
   WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
   WM_msg_publish_rna_prop(mbus, &scene->id, view_layer, LayerObjects, active);
-  DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_SELECT);
+  DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
 }
 
 bool ED_object_base_deselect_all_ex(ViewLayer *view_layer,
diff --git a/source/blender/makesrna/intern/rna_layer.c 
b/source/blender/makesrna/intern/rna_layer.c
index fa8a44ed10d..be7985b69a4 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -349,7 +349,6 @@ static void rna_def_layer_collection(BlenderRNA *brna)
   RNA_def_property_boolean_funcs(prop, NULL, 
"rna_LayerCollection_exclude_set");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
   RNA_def_property_ui_text(prop, "Exclude from View Layer", "Exclude from view 
layer");
-  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
   RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
   RNA_def_property_update(prop, NC_SCENE | ND_LAYER, 
"rna_LayerCollection_exclude_update");
 
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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to