diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-15 12:03:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-15 12:03:22 +0300 |
commit | f41660cfd0366fd512ddbf125a0ee57f22449bf2 (patch) | |
tree | 9f77bb4ab3a4ab67de6c4f0386adc7add8b2daa0 /source | |
parent | ea8b072b75e5242343dbb4910599f8c37d3bf80f (diff) |
GLSL: fix some notifiers for scene settings and remove unneeded check.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_add.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 8ed9e10a758..1ec3a82fc58 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -295,8 +295,7 @@ Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot, int en ED_object_base_init_transform(C, BASACT, loc, rot); DAG_scene_sort(scene); - if(ob->data) /* could be an empty */ - ED_render_id_flush_update(G.main, ob->data); + ED_render_id_flush_update(G.main, ob->data); if(enter_editmode) ED_object_enter_editmode(C, EM_IGNORE_LAYER); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 2463861e0e0..5f1e3acc347 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1516,37 +1516,37 @@ static void rna_def_scene_game_data(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "matmode"); RNA_def_property_enum_items(prop, material_items); RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS); RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS); RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS); RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS); RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES); RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX); RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL); } static void rna_def_scene_render_layer(BlenderRNA *brna) |