diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 7bdaa0a512f..63fce2d9edb 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -40,6 +40,7 @@ #include "BLI_math.h" /* Include for Bake Options */ +#include "RE_engine.h" #include "RE_pipeline.h" #ifdef WITH_QUICKTIME @@ -55,6 +56,8 @@ #include <libavformat/avformat.h> #endif +#include "ED_render.h" + #include "WM_api.h" #include "WM_types.h" @@ -773,6 +776,11 @@ static int rna_RenderSettings_engine_get(PointerRNA *ptr) return 0; } +static void rna_RenderSettings_engine_update(Main *bmain, Scene *UNUSED(unused), PointerRNA *UNUSED(ptr)) +{ + ED_render_engine_changed(bmain); +} + static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene= (Scene*)ptr->id.data; @@ -830,6 +838,12 @@ static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr)) return (BLI_countlist(&R_engines) > 1); } +static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr) +{ + Scene *scene= (Scene*)ptr->id.data; + return scene_use_new_shading_nodes(scene); +} + static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr) { RenderData *rd= (RenderData*)ptr->data; @@ -3212,13 +3226,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set", "rna_RenderSettings_engine_itemf"); RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering"); - RNA_def_property_update(prop, NC_WINDOW, NULL); + RNA_def_property_update(prop, NC_WINDOW, "rna_RenderSettings_engine_update"); prop= RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engines_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available"); + prop= RNA_def_property(srna, "use_shading_nodes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_shading_nodes_get", NULL); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Use Shading Nodes", "Active render engine uses new shading nodes system"); + prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_game_engine_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); |