[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22843] branches/blender2.5/blender: Sequence sound was raising a python exception with crop and offset buttons .
Campbell Barton
ideasman42 at gmail.com
Fri Aug 28 17:03:50 CEST 2009
Revision: 22843
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22843
Author: campbellbarton
Date: 2009-08-28 17:03:49 +0200 (Fri, 28 Aug 2009)
Log Message:
-----------
Sequence sound was raising a python exception with crop and offset buttons.
renamed RNA properties.
x_offset, y_offset -> offset_x, offset_y, this order is more common in rna.
render.border -> render.use_border
render.placeholders -> render.use_placeholder
render.no_overwrite -> render.use_overwrite
Modified Paths:
--------------
branches/blender2.5/blender/release/ui/buttons_data_text.py
branches/blender2.5/blender/release/ui/buttons_scene.py
branches/blender2.5/blender/release/ui/space_sequencer.py
branches/blender2.5/blender/release/ui/space_view3d.py
branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_space.c
Modified: branches/blender2.5/blender/release/ui/buttons_data_text.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_text.py 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/release/ui/buttons_data_text.py 2009-08-28 15:03:49 UTC (rev 22843)
@@ -134,8 +134,8 @@
col = split.column(align=True)
col.itemL(text="Offset:")
- col.itemR(text, "x_offset", text="X")
- col.itemR(text, "y_offset", text="Y")
+ col.itemR(text, "offset_x", text="X")
+ col.itemR(text, "offset_y", text="Y")
#col.itemR(text, "wrap")
"""
Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py 2009-08-28 15:03:49 UTC (rev 22843)
@@ -222,8 +222,8 @@
col = split.column()
col.itemR(rd, "file_extensions")
- col.itemR(rd, "placeholders")
- col.itemR(rd, "no_overwrite")
+ col.itemR(rd, "use_overwrite")
+ col.itemR(rd, "use_placeholder")
if rd.file_format in ('AVIJPEG', 'JPEG'):
split = layout.split()
@@ -370,9 +370,9 @@
sub.itemR(rd, "pixel_aspect_y", text="Y")
row = col.row()
- row.itemR(rd, "border", text="Border")
+ row.itemR(rd, "use_border", text="Border")
rowsub = row.row()
- rowsub.active = rd.border
+ rowsub.active = rd.use_border
rowsub.itemR(rd, "crop_to_border", text="Crop")
col = split.column(align=True)
Modified: branches/blender2.5/blender/release/ui/space_sequencer.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_sequencer.py 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/release/ui/space_sequencer.py 2009-08-28 15:03:49 UTC (rev 22843)
@@ -434,26 +434,27 @@
if elem:
col.itemR(elem, "filename", text="") # strip.elements[0] could be a fallback
- layout.itemR(strip, "use_translation", text="Image Offset:")
- if strip.transform:
+ if strip.type != 'SOUND':
+ layout.itemR(strip, "use_translation", text="Image Offset:")
+ if strip.transform:
+ col = layout.column(align=True)
+ col.active = strip.use_translation
+ col.itemR(strip.transform, "offset_x", text="X")
+ col.itemR(strip.transform, "offset_y", text="Y")
+
+ layout.itemR(strip, "use_crop", text="Image Crop:")
+ if strip.crop:
+ col = layout.column(align=True)
+ col.active = strip.use_crop
+ col.itemR(strip.crop, "top")
+ col.itemR(strip.crop, "left")
+ col.itemR(strip.crop, "bottom")
+ col.itemR(strip.crop, "right")
+
col = layout.column(align=True)
- col.active = strip.use_translation
- col.itemR(strip.transform, "offset_x", text="X")
- col.itemR(strip.transform, "offset_y", text="Y")
-
- layout.itemR(strip, "use_crop", text="Image Crop:")
- if strip.crop:
- col = layout.column(align=True)
- col.active = strip.use_crop
- col.itemR(strip.crop, "top")
- col.itemR(strip.crop, "left")
- col.itemR(strip.crop, "bottom")
- col.itemR(strip.crop, "right")
-
- col = layout.column(align=True)
- col.itemL(text="Trim Duration:")
- col.itemR(strip, "animation_start_offset", text="Start")
- col.itemR(strip, "animation_end_offset", text="End")
+ col.itemL(text="Trim Duration:")
+ col.itemR(strip, "animation_start_offset", text="Start")
+ col.itemR(strip, "animation_end_offset", text="End")
class SEQUENCER_PT_sound(SequencerButtonsPanel):
__label__ = "Sound"
Modified: branches/blender2.5/blender/release/ui/space_view3d.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_view3d.py 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/release/ui/space_view3d.py 2009-08-28 15:03:49 UTC (rev 22843)
@@ -1244,8 +1244,8 @@
col.itemL(text="Offset:")
col = layout.column(align=True)
- col.itemR(bg, "x_offset", text="X")
- col.itemR(bg, "y_offset", text="Y")
+ col.itemR(bg, "offset_x", text="X")
+ col.itemR(bg, "offset_y", text="Y")
bpy.types.register(VIEW3D_HT_header) # Header
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c 2009-08-28 15:03:49 UTC (rev 22843)
@@ -401,13 +401,13 @@
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object center");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object center");
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c 2009-08-28 15:03:49 UTC (rev 22843)
@@ -1650,7 +1650,7 @@
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "border", PROP_BOOLEAN, PROP_NONE);
+ 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_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1660,14 +1660,14 @@
RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "placeholders", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "no_overwrite", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
- RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
+ prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
+ RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_space.c 2009-08-28 14:25:17 UTC (rev 22842)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_space.c 2009-08-28 15:03:49 UTC (rev 22843)
@@ -493,12 +493,12 @@
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image vertically from the view center");
RNA_def_property_update(prop, NC_WINDOW, NULL);
@@ -913,11 +913,11 @@
/* not sure we need rna access to these but adding anyway */
- prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
- prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image horizontally from the view center");
More information about the Bf-blender-cvs
mailing list