[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26686] trunk/blender: Patch by matd ( on irc).

Martin Poirier theeth at yahoo.com
Sun Feb 7 19:06:12 CET 2010


Revision: 26686
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26686
Author:   theeth
Date:     2010-02-07 19:06:12 +0100 (Sun, 07 Feb 2010)

Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_render.py
    trunk/blender/source/blender/makesrna/intern/rna_scene.c
    trunk/blender/source/blender/render/intern/source/pipeline.c

Modified: trunk/blender/release/scripts/ui/properties_render.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_render.py	2010-02-07 17:56:55 UTC (rev 26685)
+++ trunk/blender/release/scripts/ui/properties_render.py	2010-02-07 18:06:12 UTC (rev 26686)
@@ -222,8 +222,8 @@
             col = split.column()
         col.label(text="Memory:")
         sub = col.column()
+        sub.enabled = not (rd.use_border or rd.full_sample) 
         sub.prop(rd, "save_buffers")
-        sub.enabled = not rd.full_sample
         sub = col.column()
         sub.active = rd.use_compositing
         sub.prop(rd, "free_image_textures")
@@ -454,7 +454,9 @@
 
         col = split.column()
         col.row().prop(rd, "antialiasing_samples", expand=True)
-        col.prop(rd, "full_sample")
+        sub = col.row() 
+        sub.enabled = not rd.use_border
+        sub.prop(rd, "full_sample")
 
         if wide_ui:
             col = split.column()

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-02-07 17:56:55 UTC (rev 26685)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-02-07 18:06:12 UTC (rev 26686)
@@ -354,8 +354,17 @@
 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;
+}
 
-	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_FULL_SAMPLE) && !(rd->mode & R_BORDER);
 }
 
 static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
@@ -2175,7 +2184,7 @@
 	
 	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 @@
 	
 	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);
 	

Modified: trunk/blender/source/blender/render/intern/source/pipeline.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/pipeline.c	2010-02-07 17:56:55 UTC (rev 26685)
+++ trunk/blender/source/blender/render/intern/source/pipeline.c	2010-02-07 18:06:12 UTC (rev 26686)
@@ -1227,6 +1227,13 @@
 #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 @@
 			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)) {





More information about the Bf-blender-cvs mailing list