diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-02-07 21:06:12 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-02-07 21:06:12 +0300 |
commit | 5882355a566c6b65334886049abe25fe821a0ef7 (patch) | |
tree | 94a7fcb9364ad3bfe739700eb29b3a3275dfb0e7 /source/blender | |
parent | 3944cda19327bf06f38c45600523dad6f64312bd (diff) |
Patch by matd (on irc).
Disables save buffers and full sample when render border is turned on (render doesn't work otherwise because save buffers doesn't support border rendering).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 14 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 11 |
2 files changed, 19 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f99946b63a6..11aff7922c7 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -354,8 +354,17 @@ static int rna_SceneRenderData_threads_get(PointerRNA *ptr) static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr) { RenderData *rd= (RenderData*)ptr->data; + if(rd->mode & R_BORDER) + return 0; + else + return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0; +} + +static int rna_SceneRenderData_full_sample_get(PointerRNA *ptr) +{ + RenderData *rd= (RenderData*)ptr->data; - return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0; + return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER); } static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value) @@ -2175,7 +2184,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER); - RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size."); + RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE); @@ -2268,6 +2277,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE); + RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_full_sample_get", NULL); RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index db8d7e317a0..f679b35c627 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1227,6 +1227,13 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer * #ifdef WITH_OPENEXR if(re->r.scemode & R_FULL_SAMPLE) re->r.scemode |= R_EXR_TILE_FILE; /* enable automatic */ + + /* Until use_border is made compatible with save_buffers/full_sample, render without the later instead of not rendering at all.*/ + if(re->r.mode & R_BORDER) + { + re->r.scemode &= ~(R_EXR_TILE_FILE|R_FULL_SAMPLE); + } + #else /* can't do this without openexr support */ re->r.scemode &= ~(R_EXR_TILE_FILE|R_FULL_SAMPLE); @@ -2608,10 +2615,6 @@ static int is_rendering_allowed(Render *re) re->error(re->erh, "No border area selected."); return 0; } - if(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) { - re->error(re->erh, "Border render and Buffer-save not supported yet"); - return 0; - } } if(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) { |