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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-16 01:12:58 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-16 01:12:58 +0400
commitfe16b2620646708bae3286b9c1300eacbc4bc0da (patch)
tree5c3b225d1e23f3797cca638649f014662031825e /source
parent8a25e2d2b2214db32b1a337253f337b63eafdef3 (diff)
Cycles: fix some update issues with camera motion blur, and do some more work
for getting object motion blur ready.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/render/render_update.c9
-rw-r--r--source/blender/makesrna/intern/rna_scene.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index cd55b91cb6b..5b1c03f65df 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -74,12 +74,19 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
bScreen *sc;
ScrArea *sa;
ARegion *ar;
+ static int recursive_check = FALSE;
/* don't do this render engine update if we're updating the scene from
* other threads doing e.g. rendering or baking jobs */
if (!BLI_thread_is_main())
return;
+ /* don't call this recursively for frame updates */
+ if(recursive_check)
+ return;
+
+ recursive_check = TRUE;
+
C = CTX_create();
CTX_data_main_set(C, bmain);
CTX_data_scene_set(C, scene);
@@ -114,6 +121,8 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
}
CTX_free(C);
+
+ recursive_check = FALSE;
}
void ED_render_engine_area_exit(ScrArea *sa)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index a3616e0845a..537dab73340 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3600,14 +3600,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blurfac");
@@ -3615,7 +3615,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.01, 2.0f, 1, 0);
RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
/* border */
prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);