[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25257] trunk/blender: Sequencer fix: Transform Strip wouldn't work with default_fader
Andrea Weikert
elubie at gmx.net
Wed Dec 9 21:03:10 CET 2009
Revision: 25257
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25257
Author: elubie
Date: 2009-12-09 21:03:08 +0100 (Wed, 09 Dec 2009)
Log Message:
-----------
Sequencer fix: Transform Strip wouldn't work with default_fader
* added default_fader to transform strip, since it used the old fac too.
* removed ANIMATEABLE attribute from the settings in the transform strip, since they are animated via the effect_fader and not directly for now. (too confusing)
* UI: only show default_fader for the effect strips that support it
Sequencer Durian feature: uniform scale for Sequence transform strip.
* for now re-using variable for x-axis scaling.
Note: This brings back functionality as close to 2.49 as possible. The Start and End values in the current design are not meant to be animated directly, but via the effect_fader.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_sequencer.py
trunk/blender/source/blender/blenkernel/intern/seqeffects.c
trunk/blender/source/blender/makesdna/DNA_sequence_types.h
trunk/blender/source/blender/makesrna/intern/rna_sequence.c
Modified: trunk/blender/release/scripts/ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/ui/space_sequencer.py 2009-12-09 19:41:27 UTC (rev 25256)
+++ trunk/blender/release/scripts/ui/space_sequencer.py 2009-12-09 20:03:08 UTC (rev 25257)
@@ -401,14 +401,23 @@
layout.separator()
col = layout.column(align=True)
- col.label(text="Scale X:")
- col.prop(strip, "scale_start_x", text="Start")
- col.prop(strip, "scale_end_x", text="End")
+ col.prop(strip, "uniform_scale")
+
+ if (strip.uniform_scale):
+ col = layout.column(align=True)
+ col.label(text="Scale:")
+ col.prop(strip, "scale_start_x", text="Start")
+ col.prop(strip, "scale_end_x", text="End")
+ else:
+ col = layout.column(align=True)
+ col.label(text="Scale X:")
+ col.prop(strip, "scale_start_x", text="Start")
+ col.prop(strip, "scale_end_x", text="End")
- col = layout.column(align=True)
- col.label(text="Scale Y:")
- col.prop(strip, "scale_start_y", text="Start")
- col.prop(strip, "scale_end_y", text="End")
+ col = layout.column(align=True)
+ col.label(text="Scale Y:")
+ col.prop(strip, "scale_start_y", text="Start")
+ col.prop(strip, "scale_end_y", text="End")
layout.separator()
@@ -420,10 +429,11 @@
col = layout.column(align=True)
if strip.type == 'SPEED':
col.prop(strip, "speed_fader", text="Speed fader")
- else:
- col.prop(strip, "use_effect_default_fade", "Default fade")
- if not strip.use_effect_default_fade:
- col.prop(strip, "effect_fader", text="Effect fader")
+ elif strip.type in ('CROSS', 'GAMMA_CROSS', 'PLUGIN', 'WIPE',
+ 'TRANSFORM'):
+ col.prop(strip, "use_effect_default_fade", "Default fade")
+ if not strip.use_effect_default_fade:
+ col.prop(strip, "effect_fader", text="Effect fader")
class SEQUENCER_PT_input(SequencerButtonsPanel):
Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2009-12-09 19:41:27 UTC (rev 25256)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2009-12-09 20:03:08 UTC (rev 25257)
@@ -2007,8 +2007,12 @@
yo = y;
//factor scale
- factxScale = scale->ScalexIni + (scale->ScalexFin - scale->ScalexIni) * facf0;
- factyScale = scale->ScaleyIni + (scale->ScaleyFin - scale->ScaleyIni) * facf0;
+ if (scale->uniform_scale) {
+ factxScale = factyScale = scale->ScalexIni + (scale->ScalexFin - scale->ScalexIni) * facf0;
+ } else {
+ factxScale = scale->ScalexIni + (scale->ScalexFin - scale->ScalexIni) * facf0;
+ factyScale = scale->ScaleyIni + (scale->ScaleyFin - scale->ScaleyIni) * facf0;
+ }
//Factor translate
if(!scale->percent){
@@ -3080,6 +3084,7 @@
rval.free = free_transform_effect;
rval.copy = copy_transform_effect;
rval.execute = do_transform_effect;
+ rval.get_default_fac = get_default_fac_fade;
break;
case SEQ_SPEED:
rval.init = init_speed_effect;
Modified: trunk/blender/source/blender/makesdna/DNA_sequence_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_sequence_types.h 2009-12-09 19:41:27 UTC (rev 25256)
+++ trunk/blender/source/blender/makesdna/DNA_sequence_types.h 2009-12-09 20:03:08 UTC (rev 25257)
@@ -221,6 +221,7 @@
float rotFin;
int percent;
int interpolation;
+ int uniform_scale; /* preserve aspect/ratio when scaling */
} TransformVars;
typedef struct SolidColorVars {
Modified: trunk/blender/source/blender/makesrna/intern/rna_sequence.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequence.c 2009-12-09 19:41:27 UTC (rev 25256)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequence.c 2009-12-09 20:03:08 UTC (rev 25257)
@@ -1063,72 +1063,90 @@
prop= RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Scale Start X", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Scale Start Y", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "scale_end_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Scale End X", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "scale_end_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Scale End Y", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "uniform_scale", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
+ RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Translate Start X", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Translate Start Y", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_end_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Translate End X", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_end_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Translate End Y", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation Start", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "rotation_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation End", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "percent");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
RNA_def_property_enum_items(prop, translation_unit_items);
RNA_def_property_ui_text(prop, "Translation Unit", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, interpolation_items);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
RNA_def_property_ui_text(prop, "Interpolation", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
More information about the Bf-blender-cvs
mailing list