diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-13 01:10:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-13 01:10:30 +0400 |
commit | 4e6fb9f4ab3d79d385b9ae35e88d33356e410d6f (patch) | |
tree | db40d8c2f4ee6537ccd344cc3c7608e7bca78785 /source/blender/makesrna | |
parent | 101e8d862401d15c95ca2ab9c017f805f9c6875f (diff) |
Fix ##29803: cycles image texture node refresh issue with image editor.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 2b5925179d8..a04ddec2098 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -369,6 +369,15 @@ static void rna_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr) node_update(bmain, scene, ntree, node); } +static void rna_Node_image_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + bNodeTree *ntree= (bNodeTree*)ptr->id.data; + bNode *node= (bNode*)ptr->data; + + node_update(bmain, scene, ntree, node); + WM_main_add_notifier(NC_IMAGE, NULL); +} + static void rna_Node_material_update(Main *bmain, Scene *scene, PointerRNA *ptr) { bNodeTree *ntree= (bNodeTree*)ptr->id.data; @@ -1268,7 +1277,7 @@ static void def_sh_tex_environment(StructRNA *srna) RNA_def_property_struct_type(prop, "Image"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Image", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_image_update"); RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage"); def_sh_tex(srna); @@ -1293,7 +1302,7 @@ static void def_sh_tex_image(StructRNA *srna) RNA_def_property_struct_type(prop, "Image"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Image", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_image_update"); RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage"); def_sh_tex(srna); |