diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-08-28 19:03:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-08-28 19:03:49 +0400 |
commit | 9e7b276dba2493fe1597fbdb0d906d1bab776fe9 (patch) | |
tree | 83745184e0c6ed4e52500c77c66398f62d8aac14 | |
parent | 9ea58be54ef62f79017678c20e04590bb5cbdaa1 (diff) |
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
-rw-r--r-- | release/ui/buttons_data_text.py | 4 | ||||
-rw-r--r-- | release/ui/buttons_scene.py | 8 | ||||
-rw-r--r-- | release/ui/space_sequencer.py | 39 | ||||
-rw-r--r-- | release/ui/space_view3d.py | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 8 |
7 files changed, 39 insertions, 38 deletions
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py index 62d4d0a4d21..1abc82cfaa3 100644 --- a/release/ui/buttons_data_text.py +++ b/release/ui/buttons_data_text.py @@ -134,8 +134,8 @@ class DATA_PT_paragraph(DataButtonsPanel): 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") """ diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index 08eee7ef43a..abd42e32e35 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -222,8 +222,8 @@ class SCENE_PT_output(RenderButtonsPanel): 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 @@ class SCENE_PT_dimensions(RenderButtonsPanel): 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) diff --git a/release/ui/space_sequencer.py b/release/ui/space_sequencer.py index de3cfa17987..cf9d89edec8 100644 --- a/release/ui/space_sequencer.py +++ b/release/ui/space_sequencer.py @@ -434,26 +434,27 @@ class SEQUENCER_PT_input(SequencerButtonsPanel): 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: - 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: + 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_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" diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py index ae17307080f..5801f9e7941 100644 --- a/release/ui/space_view3d.py +++ b/release/ui/space_view3d.py @@ -1244,8 +1244,8 @@ class VIEW3D_PT_background_image(bpy.types.Panel): 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 diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 1dd3d0e63c5..bb094eef962 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -401,13 +401,13 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna) 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"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 2408d9337e1..02b891c6cd2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1650,7 +1650,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) 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 @@ static void rna_def_scene_render_data(BlenderRNA *brna) 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); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index a754d619741..d6a17526a65 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -493,12 +493,12 @@ static void rna_def_background_image(BlenderRNA *brna) 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 @@ static void rna_def_space_sequencer(BlenderRNA *brna) /* 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"); |