[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20718] branches/blender2.5/blender: * Added some Image Format Options to the the scene output panel.

Thomas Dinges dingto at gmx.de
Sun Jun 7 21:18:20 CEST 2009


Revision: 20718
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20718
Author:   dingto
Date:     2009-06-07 21:18:20 +0200 (Sun, 07 Jun 2009)

Log Message:
-----------
* Added some Image Format Options to the the scene output panel. Patch by William Reynish. Thanks!
* Added missing Notifiers for Subsurface Scattering.  

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_scene.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c

Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py	2009-06-07 18:19:28 UTC (rev 20717)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py	2009-06-07 19:18:20 UTC (rev 20718)
@@ -44,28 +44,58 @@
 		split = layout.split()
 		
 		col = split.column()
-		col.itemR(rd, "file_format", text="Format")
-		if rd.file_format in ("AVIJPEG", "JPEG"):
-			col.itemR(rd, "quality", slider=True)
+		col.itemR(rd, "file_extensions")		
+		col.itemR(rd, "fields", text="Fields")
+		colsub = col.column()
+		colsub.active = rd.fields
+		colsub.itemR(rd, "fields_still", text="Still")
+		colsub.row().itemR(rd, "field_order", expand=True)
 		
-		sub = split.column()
-		sub.itemR(rd, "color_mode")
-		sub.itemR(rd, "alpha_mode")
+		col = split.column()
+		col.itemR(rd, "color_mode")
+		col.itemR(rd, "alpha_mode")
+		col.itemL(text="Distributed Rendering:")
+		col.itemR(rd, "placeholders")
+		col.itemR(rd, "no_overwrite")
 		
+		
+		layout.itemR(rd, "file_format", text="Format")
+		
 		split = layout.split()
 		
-		sub = split.column()
-		sub.itemR(rd, "file_extensions")
-		sub.itemL(text="Distributed Rendering:")
-		sub.itemR(rd, "placeholders")
-		sub.itemR(rd, "no_overwrite")
+		col = split.column()
 		
-		col = split.column()
-		col.itemR(rd, "fields", text="Fields")
-		colsub = col.column()
-		colsub.active = rd.fields
-		colsub.itemR(rd, "fields_still", text="Still")
-		colsub.row().itemR(rd, "field_order", expand=True)
+		if rd.file_format in ("AVIJPEG", "JPEG"):
+			col.itemR(rd, "quality", slider=True)
+			
+		elif rd.file_format in ("OPENEXR"):
+			col.itemR(rd, "exr_codec")
+			col.itemR(rd, "exr_half")
+			col = split.column()
+			col.itemR(rd, "exr_zbuf")
+			col.itemR(rd, "exr_preview")
+		
+		elif rd.file_format in ("JPEG2000"):
+			row = layout.row()
+			row.itemR(rd, "jpeg_preset")
+			split = layout.split()
+			col = split.column()
+			col.itemL(text="Depth:")
+			col.row().itemR(rd, "jpeg_depth", expand=True)
+			col = split.column()
+			col.itemR(rd, "jpeg_ycc")
+			col.itemR(rd, "exr_preview")
+			
+		elif rd.file_format in ("CINEON", "DPX"):
+			col.itemR(rd, "cineon_log", text="Convert to Log")
+			colsub = col.column()
+			colsub.active = rd.cineon_log
+			colsub.itemR(rd, "cineon_black", text="Black")
+			colsub.itemR(rd, "cineon_white", text="White")
+			colsub.itemR(rd, "cineon_gamma", text="Gamma")
+			
+		elif rd.file_format in ("TIFF"):
+			col.itemR(rd, "tiff_bit")
 
 class RENDER_PT_antialiasing(RenderButtonsPanel):
 	__label__ = "Anti-Aliasing"

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c	2009-06-07 18:19:28 UTC (rev 20717)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c	2009-06-07 19:18:20 UTC (rev 20718)
@@ -588,49 +588,59 @@
 	RNA_def_property_range(prop, 0.001, FLT_MAX);
 	RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
 	RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
 	RNA_def_property_float_sdna(prop, NULL, "sss_col");
 	RNA_def_property_ui_text(prop, "Color", "Scattering color.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_error");
 	RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3);
 	RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality).");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_scale");
 	RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3);
 	RNA_def_property_ui_text(prop, "Scale", "Object scale factor.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_ior");
 	RNA_def_property_ui_range(prop, 0.1, 2, 1, 3);
 	RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser).");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
 	RNA_def_property_range(prop, 0, 1);
 	RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
 	RNA_def_property_range(prop, 0, 1);
 	RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_front");
 	RNA_def_property_range(prop, 0, 2);
 	RNA_def_property_ui_text(prop, "Front", "Front scattering weight.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sss_back");
 	RNA_def_property_range(prop, 0, 10);
 	RNA_def_property_ui_text(prop, "Back", "Back scattering weight.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 
 	prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS);
 	RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material.");
+	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 }
 
 void rna_def_material_specularity(StructRNA *srna)





More information about the Bf-blender-cvs mailing list