diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-19 14:10:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-19 14:10:56 +0300 |
commit | 47541fe47e1a188c3e851883d74ba193e327831d (patch) | |
tree | 6a0883e0e8c9365579d87c0dd9f3537f30e8491b /source/blender/makesrna | |
parent | 506e692263cef4dfb6a15c0543e8a04d2975e3b1 (diff) |
fix [#24810] Mist Settings Are Not Visually Updated When Camera Displays Mist
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_world.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index 5807143f3a3..969536972f7 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -98,6 +98,16 @@ static void rna_World_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr) WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo); } +/* so camera mist limits redraw */ +static void rna_World_draw_mist_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + World *wo= ptr->id.data; + + DAG_id_flush_update(&wo->id, 0); + WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo); + WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); +} + static void rna_World_stars_update(Main *bmain, Scene *scene, PointerRNA *ptr) { World *wo= ptr->id.data; @@ -388,14 +398,14 @@ static void rna_def_world_mist(BlenderRNA *brna) RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera"); - RNA_def_property_update(prop, 0, "rna_World_draw_update"); + RNA_def_property_update(prop, 0, "rna_World_draw_mist_update"); prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "mistdist"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); RNA_def_property_ui_text(prop, "Depth", "The distance over which the mist effect fades in"); - RNA_def_property_update(prop, 0, "rna_World_draw_update"); + RNA_def_property_update(prop, 0, "rna_World_draw_mist_update"); prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "misthi"); |