[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20417] branches/blender2.5/blender: * Scene buttons tweaks
Matt Ebb
matt at mke3.net
Tue May 26 07:03:27 CEST 2009
Revision: 20417
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20417
Author: broken
Date: 2009-05-26 07:03:27 +0200 (Tue, 26 May 2009)
Log Message:
-----------
* Scene buttons tweaks
* Added 'render stamp' rna & buttons
Modified Paths:
--------------
branches/blender2.5/blender/release/ui/buttons_scene.py
branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py 2009-05-26 04:17:47 UTC (rev 20416)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py 2009-05-26 05:03:27 UTC (rev 20417)
@@ -27,6 +27,7 @@
sub.itemR(rd, "render_raytracing", text="Ray Tracing")
if (rd.render_raytracing):
sub.itemR(rd, "octree_resolution", text="Octree")
+ sub.itemR(rd, "dither_intensity", text="Dither", slider=True)
class RENDER_PT_output(RenderButtonsPanel):
__label__ = "Output"
@@ -42,8 +43,8 @@
split = layout.split()
sub = split.column()
- sub.itemR(rd, "image_type")
- if rd.image_type in ("AVIJPEG", "JPEG"):
+ sub.itemR(rd, "file_format", text="Format")
+ if rd.file_format in ("AVIJPEG", "JPEG"):
sub.itemR(rd, "quality", slider=True)
sub = split.column()
@@ -126,9 +127,11 @@
sub.itemR(rd, "parts_x", text="X")
sub.itemR(rd, "parts_y", text="Y")
- row = layout.row()
- row.itemR(rd, "panorama")
- row.itemR(rd, "dither_intensity", text="Dither", slider=True)
+ split = layout.split()
+ sub = split.column()
+ sub = split.column()
+ sub.itemR(rd, "panorama")
+
# row.itemR(rd, "backbuf")
class RENDER_PT_dimensions(RenderButtonsPanel):
@@ -167,9 +170,45 @@
col.itemL(text="Frame Rate:")
col.itemR(rd, "fps")
col.itemR(rd, "fps_base",text="/")
+
+class RENDER_PT_stamp(RenderButtonsPanel):
+ __label__ = "Stamp"
+
+ def draw_header(self, context):
+ rd = context.scene.render_data
+
+ layout = self.layout
+ layout.itemR(rd, "stamp", text="")
+
+ def draw(self, context):
+ scene = context.scene
+ layout = self.layout
+
+ rd = scene.render_data
+
+ split = layout.split()
+ sub = split.column()
+ sub.itemR(rd, "stamp_time", text="Time")
+ sub.itemR(rd, "stamp_date", text="Date")
+ sub.itemR(rd, "stamp_frame", text="Frame")
+ sub.itemR(rd, "stamp_camera", text="Scene")
+ sub.itemR(rd, "stamp_marker", text="Marker")
+ sub.itemR(rd, "stamp_filename", text="Filename")
+ sub.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
+ sub.itemR(rd, "stamp_note", text="Note")
+ if (rd.stamp_note):
+ sub.itemR(rd, "stamp_note_text", text="")
+
+ sub = split.column()
+ sub.itemR(rd, "render_stamp")
+ sub.itemR(rd, "stamp_foreground")
+ sub.itemR(rd, "stamp_background")
+ sub.itemR(rd, "stamp_font_size", text="Font Size")
+
bpy.types.register(RENDER_PT_render)
bpy.types.register(RENDER_PT_dimensions)
bpy.types.register(RENDER_PT_antialiasing)
bpy.types.register(RENDER_PT_shading)
-bpy.types.register(RENDER_PT_output)
\ No newline at end of file
+bpy.types.register(RENDER_PT_output)
+bpy.types.register(RENDER_PT_stamp)
\ No newline at end of file
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c 2009-05-26 04:17:47 UTC (rev 20416)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c 2009-05-26 05:03:27 UTC (rev 20417)
@@ -210,7 +210,16 @@
{0, "THREADS_AUTO", "Auto-detect", ""},
{R_FIXED_THREADS, "THREADS_FIXED", "Fixed Number", ""},
{0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem stamp_font_size_items[] = {
+ {1, "STAMP_FONT_TINY", "Tiny", ""},
+ {2, "STAMP_FONT_SMALL", "Small", ""},
+ {3, "STAMP_FONT_MEDIUM", "Medium", ""},
+ {0, "STAMP_FONT_LARGE", "Large", ""},
+ {4, "STAMP_FONT_EXTRALARGE", "Extra Large", ""},
+ {0, NULL, NULL, NULL}};
+
static EnumPropertyItem image_type_items[] = {
{R_FRAMESERVER, "FRAMESERVER", "Frame Server", ""},
#ifdef WITH_FFMPEG
@@ -476,10 +485,10 @@
RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "image_type", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
- RNA_def_property_ui_text(prop, "Image Type", "File format to save the rendered images as.");
+ RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
@@ -506,6 +515,85 @@
RNA_def_property_string_sdna(prop, NULL, "pic");
RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_STAMP_INFO);
+ RNA_def_property_ui_text(prop, "Stamp", "Embed metadata into the rendered image");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
+ RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_date", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
+ RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_frame", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
+ RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_camera", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
+ RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_scene", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
+ RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_note", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
+ RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_marker", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
+ RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_filename", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
+ RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_sequence_strip", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
+ RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_DIRPATH);
+ RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
+ RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "render_stamp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
+ RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_font_size", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "stamp_font_id");
+ RNA_def_property_enum_items(prop, stamp_font_size_items);
+ RNA_def_property_ui_text(prop, "Stamp Font Size", "Size of the font used when rendering stamp info text");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Stamp Foreground", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Stamp Background", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
}
void RNA_def_scene(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list