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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r--source/blender/makesrna/intern/rna_material.c12
1 files changed, 8 insertions, 4 deletions
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;
}