diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-06-28 21:13:54 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-06-28 21:23:34 +0400 |
commit | 78cdc707ab4d10017c70e5c860146f40ec8457a4 (patch) | |
tree | a4bcd6c40b0c60df11ec65fc1f2440ea4302d39a /source/blender/makesrna | |
parent | 0caee7843e51c5c7a24e24a18de4f4aa6cbf6550 (diff) |
Add render result caching.
Simply add an option to render settings to save an EXR cache,
just when the render is finished. Also changed RE_ReadRenderResult() to read
cache instead of temp sample files (those are fully volatile now anyway).
Path to save cached render results is an UserPreferences setting.
Also added 'Reload render' feature to the Image Editor (so one can now re-open a blend,
and in an Image Editor hit ctrl-R to (try to) reload last render from cache).
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D553
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index bcdb469dd85..bce7d0062f2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4811,6 +4811,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna) "and length of frame numbers"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + /* Render result EXR cache. */ + prop = RNA_def_property(srna, "use_render_cache", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_CACHE_FILE); + RNA_def_property_ui_text(prop, "Cache Result", + "Save render cache to EXR files (useful for heavy compositing, " + "Note: affects indirectly rendered scenes)"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + /* Bake */ prop = RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index f69e768670e..f4974266f60 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -4272,6 +4272,10 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files"); RNA_def_property_update(prop, 0, "rna_userdef_temp_update"); + prop = RNA_def_property(srna, "render_cache_directory", PROP_STRING, PROP_DIRPATH); + RNA_def_property_string_sdna(prop, NULL, "render_cachedir"); + RNA_def_property_ui_text(prop, "Render Cache Path", "Where to cache raw render results"); + prop = RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "image_editor"); RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor"); |