From 1f650c402d3b43eee7cb51c7d4f373ba82ac2116 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 4 Jun 2019 00:21:57 +1000 Subject: Cleanup: style, use braces in RNA --- source/blender/makesrna/intern/rna_material.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender/makesrna/intern/rna_material.c') diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index df48b679235..3ff2e884d92 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -101,8 +101,9 @@ static void rna_Material_update_previews(Main *UNUSED(bmain), { Material *ma = ptr->id.data; - if (ma->nodetree) + if (ma->nodetree) { BKE_node_preview_clear_tree(ma->nodetree); + } WM_main_add_notifier(NC_MATERIAL | ND_SHADING_PREVIEW, ma); } @@ -156,8 +157,9 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, } } } - if (node) + if (node) { nodeSetActive(ma->nodetree, node); + } } if (ma->texpaintslot) { @@ -198,8 +200,9 @@ static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr) Material *ma = (Material *)ptr->data; Main *bmain = CTX_data_main(C); - if (ma->use_nodes && ma->nodetree == NULL) + if (ma->use_nodes && ma->nodetree == NULL) { ED_node_shader_default(C, &ma->id); + } DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE); DEG_relations_tag_update(bmain); @@ -298,8 +301,9 @@ static void rna_TexPaintSlot_uv_layer_set(PointerRNA *ptr, const char *value) static bool rna_is_grease_pencil_get(PointerRNA *ptr) { Material *ma = (Material *)ptr->data; - if (ma->gp_style != NULL) + if (ma->gp_style != NULL) { return true; + } return false; } -- cgit v1.2.3