[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57966] trunk/blender/source/blender/ render/intern/source/pipeline.c: Fix #35986: " Full sample AA not supported without 3d rendering" message was
Brecht Van Lommel
brechtvanlommel at pandora.be
Wed Jul 3 19:02:10 CEST 2013
Revision: 57966
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57966
Author: blendix
Date: 2013-07-03 17:02:09 +0000 (Wed, 03 Jul 2013)
Log Message:
-----------
Fix #35986: "Full sample AA not supported without 3d rendering" message was
displayed even with antialiasing disabled.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/pipeline.c
Modified: trunk/blender/source/blender/render/intern/source/pipeline.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/pipeline.c 2013-07-03 15:57:30 UTC (rev 57965)
+++ trunk/blender/source/blender/render/intern/source/pipeline.c 2013-07-03 17:02:09 UTC (rev 57966)
@@ -468,7 +468,31 @@
/* ********* initialize state ******** */
+/* clear full sample and tile flags if needed */
+static int check_mode_full_sample(RenderData *rd)
+{
+ int scemode = rd->scemode;
+ if ((rd->mode & R_OSA) == 0)
+ scemode &= ~R_FULL_SAMPLE;
+
+#ifdef WITH_OPENEXR
+ if (scemode & R_FULL_SAMPLE)
+ 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 (rd->mode & R_BORDER) {
+ scemode &= ~(R_EXR_TILE_FILE | R_FULL_SAMPLE);
+ }
+
+#else
+ /* can't do this without openexr support */
+ scemode &= ~(R_EXR_TILE_FILE | R_FULL_SAMPLE);
+#endif
+
+ return scemode;
+}
+
/* what doesn't change during entire render sequence */
/* disprect is optional, if NULL it assumes full window render */
void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *srl, int winx, int winy, rcti *disprect)
@@ -533,22 +557,7 @@
return;
}
- if ((re->r.mode & (R_OSA)) == 0)
- re->r.scemode &= ~R_FULL_SAMPLE;
-
-#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);
-#endif
+ re->r.scemode = check_mode_full_sample(&re->r);
/* fullsample wants uniform osa levels */
if (source && (re->r.scemode & R_FULL_SAMPLE)) {
@@ -2222,6 +2231,7 @@
int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *reports)
{
SceneRenderLayer *srl;
+ int scemode = check_mode_full_sample(&scene->r);
if (scene->r.mode & R_BORDER) {
if (scene->r.border.xmax <= scene->r.border.xmin ||
@@ -2232,7 +2242,7 @@
}
}
- if (scene->r.scemode & (R_EXR_TILE_FILE | R_FULL_SAMPLE)) {
+ if (scemode & (R_EXR_TILE_FILE | R_FULL_SAMPLE)) {
char str[FILE_MAX];
render_result_exr_file_path(scene, "", 0, str);
@@ -2243,16 +2253,14 @@
}
/* no fullsample and edge */
- if ((scene->r.scemode & R_FULL_SAMPLE) && (scene->r.mode & R_EDGE)) {
+ if ((scemode & R_FULL_SAMPLE) && (scene->r.mode & R_EDGE)) {
BKE_report(reports, RPT_ERROR, "Full sample does not support edge enhance");
return 0;
}
}
- else
- scene->r.scemode &= ~R_FULL_SAMPLE; /* clear to be sure */
- if (scene->r.scemode & R_DOCOMP) {
+ if (scemode & R_DOCOMP) {
if (scene->use_nodes) {
if (!scene->nodetree) {
BKE_report(reports, RPT_ERROR, "No node tree in scene");
@@ -2264,7 +2272,7 @@
return 0;
}
- if (scene->r.scemode & R_FULL_SAMPLE) {
+ if (scemode & R_FULL_SAMPLE) {
if (composite_needs_render(scene, 0) == 0) {
BKE_report(reports, RPT_ERROR, "Full sample AA not supported without 3D rendering");
return 0;
@@ -2298,7 +2306,7 @@
}
/* layer flag tests */
- if (scene->r.scemode & R_SINGLE_LAYER) {
+ if (scemode & R_SINGLE_LAYER) {
srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
/* force layer to be enabled */
srl->layflag &= ~SCE_LAY_DISABLE;
@@ -2322,7 +2330,6 @@
if (re->r.osa == 0)
re->r.scemode &= ~R_FULL_SAMPLE;
}
- else re->r.scemode &= ~R_FULL_SAMPLE; /* clear to be sure */
if (RE_engine_is_external(re)) {
/* not supported yet */
More information about the Bf-blender-cvs
mailing list