[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60318] branches/soc-2013-vse: Updating python ui scripts and rna for VSE changes.
Alexander Kuznetsov
kuzsasha at gmail.com
Mon Sep 23 01:21:38 CEST 2013
Revision: 60318
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60318
Author: alexk
Date: 2013-09-22 23:21:38 +0000 (Sun, 22 Sep 2013)
Log Message:
-----------
Updating python ui scripts and rna for VSE changes. Plus forgotten cmake changes.
Modified Paths:
--------------
branches/soc-2013-vse/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2013-vse/source/blender/CMakeLists.txt
branches/soc-2013-vse/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2013-vse/source/blender/makesrna/intern/rna_sequencer_api.c
branches/soc-2013-vse/source/creator/CMakeLists.txt
Modified: branches/soc-2013-vse/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2013-vse/release/scripts/startup/bl_ui/space_sequencer.py 2013-09-22 23:14:55 UTC (rev 60317)
+++ branches/soc-2013-vse/release/scripts/startup/bl_ui/space_sequencer.py 2013-09-22 23:21:38 UTC (rev 60318)
@@ -267,11 +267,12 @@
layout.operator("sequencer.effect_strip_add", text="Over Drop").type = 'OVER_DROP'
layout.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE'
layout.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW'
- layout.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM'
- layout.operator("sequencer.effect_strip_add", text="Color").type = 'COLOR'
- layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
- layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
- layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
+ layout.operator("sequencer.effect_strip_add", text="Brightness and Contrast").type = 'BRIGHTNESSCONTRAST'
+# layout.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM'
+# layout.operator("sequencer.effect_strip_add", text="Color").type = 'COLOR'
+# layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
+# layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
+# layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
class SEQUENCER_MT_strip(Menu):
@@ -465,7 +466,7 @@
return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
- 'MULTICAM'}
+ 'MULTICAM', 'BRIGHTNESSCONTRAST'}
def draw(self, context):
layout = self.layout
@@ -503,6 +504,11 @@
row = layout.row()
row.prop(strip, "quality", slider=True)
row.prop(strip, "use_only_boost")
+
+ elif strip.type == 'BRIGHTNESSCONTRAST':
+ flow = layout.column_flow()
+ flow.prop(strip, "brightness", slider=True)
+ flow.prop(strip, "contrast", slider=True)
elif strip.type == 'SPEED':
layout.prop(strip, "use_default_fade", "Stretch to input strip length")
@@ -582,7 +588,7 @@
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
- 'MULTICAM', 'SPEED', 'ADJUSTMENT'}
+ 'MULTICAM', 'SPEED', 'ADJUSTMENT', 'BRIGHTNESSCONTRAST'}
def draw(self, context):
layout = self.layout
@@ -633,6 +639,14 @@
col.prop(strip.crop, "min_x")
col.prop(strip.crop, "min_y")
col.prop(strip.crop, "max_x")
+
+ layout.prop(strip, "transformation", text="Image Transformation")
+ col = layout.column(align=True)
+ col.prop(strip.transformation, "scalex")
+ col.prop(strip.transformation, "scaley")
+ col.prop(strip.transformation, "rotrad")
+ col.prop(strip.transformation, "translatex")
+ col.prop(strip.transformation, "translatey")
if not isinstance(strip, bpy.types.EffectSequence):
col = layout.column(align=True)
Modified: branches/soc-2013-vse/source/blender/CMakeLists.txt
===================================================================
--- branches/soc-2013-vse/source/blender/CMakeLists.txt 2013-09-22 23:14:55 UTC (rev 60317)
+++ branches/soc-2013-vse/source/blender/CMakeLists.txt 2013-09-22 23:21:38 UTC (rev 60318)
@@ -102,13 +102,16 @@
add_subdirectory(blenfont)
add_subdirectory(blenloader)
add_subdirectory(ikplugin)
+add_subdirectory(cldm)
add_subdirectory(gpu)
add_subdirectory(imbuf)
add_subdirectory(nodes)
add_subdirectory(modifiers)
add_subdirectory(makesdna)
add_subdirectory(makesrna)
+add_subdirectory(sequencer)
+
if(WITH_COMPOSITOR)
add_subdirectory(compositor)
endif()
Modified: branches/soc-2013-vse/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- branches/soc-2013-vse/source/blender/makesrna/intern/rna_sequencer.c 2013-09-22 23:14:55 UTC (rev 60317)
+++ branches/soc-2013-vse/source/blender/makesrna/intern/rna_sequencer.c 2013-09-22 23:21:38 UTC (rev 60318)
@@ -248,8 +248,8 @@
Sequence *seq = (Sequence *)ptr->data;
Scene *scene = (Scene *)ptr->id.data;
- BKE_sequence_tx_set_final_right(seq, seq->start + value);
- do_sequence_frame_change_update(scene, seq);
+ //BKE_sequence_tx_set_final_right(seq, seq->start + value);
+ //do_sequence_frame_change_update(scene, seq);
}
static int rna_Sequence_frame_length_get(PointerRNA *ptr)
@@ -262,6 +262,7 @@
{
Sequence *seq = (Sequence *)ptr->data;
/* Effect sequences' start frame and length must be readonly! */
+ return PROP_EDITABLE;
return (BKE_sequence_effect_get_num_inputs(seq->type)) ? 0 : PROP_EDITABLE;
}
@@ -355,6 +356,8 @@
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = sequence_get_by_transform(ed, ptr->data);
+ return BLI_strdup("testroma");
+
if (seq && seq->name + 2) {
char name_esc[(sizeof(seq->name) - 2) * 2];
@@ -746,7 +749,7 @@
if (smd->type == seqModifierType_ColorBalance) {
ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *) smd;
- if (&cbmd->color_balance == data->data) {
+ if (&cbmd->data.color_balance == data->data) {
data->seq = seq;
data->smd = smd;
return -1; /* done so bail out */
@@ -1137,6 +1140,56 @@
}
+static void rna_def_strip_transformation(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "SequenceTransformation", NULL);
+ RNA_def_struct_ui_text(srna, "New Sequence Transform", "Transform parameters for a sequence strip");
+ RNA_def_struct_sdna(srna, "StTransformationVars");
+
+ prop = RNA_def_property(srna, "scalex", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_ui_range(prop, -4.0f, 4.0f, 0.1, 3);
+ RNA_def_property_float_sdna(prop, NULL, "ScaleX");
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Scale X", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "scaley", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_ui_range(prop, -4.0f, 4.0f, 0.1, 3);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_float_sdna(prop, NULL, "ScaleY");
+ RNA_def_property_ui_text(prop, "Scale Y", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "rotrad", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_float_sdna(prop, NULL, "rotRad");
+ RNA_def_property_range(prop, 0, M_PI);
+ RNA_def_property_ui_text(prop, "Rotation in radians", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "translatex", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_ui_range(prop, -4.0f, 4.0f, 0.1, 3);
+ RNA_def_property_float_sdna(prop, NULL, "TranX");
+ RNA_def_property_ui_text(prop, "Translate X", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "translatey", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_ui_range(prop, -4.0f, 4.0f, 0.1, 3);
+ RNA_def_property_float_sdna(prop, NULL, "TranY");
+ RNA_def_property_ui_text(prop, "Translate Y", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ RNA_def_struct_path_func(srna, "rna_SequenceTransform_path");
+
+}
+
static void rna_def_strip_proxy(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1357,6 +1410,7 @@
{SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
{SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
{SEQ_TYPE_GLOW, "GLOW", 0, "Glow", ""},
+ {SEQ_TYPE_BRIGHTNESSCONTRAST, "BRIGHTNESSCONTRAST", 0, "Brightness and Contrast", ""},
{SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
{SEQ_TYPE_COLOR, "COLOR", 0, "Color", ""},
{SEQ_TYPE_SPEED, "SPEED", 0, "Speed", ""},
@@ -1499,6 +1553,7 @@
prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
RNA_def_property_enum_items(prop, blend_mode_items);
+ RNA_def_property_enum_default(prop, SEQ_BLEND_REPLACE);
RNA_def_property_ui_text(prop, "Blend Mode", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
@@ -1673,6 +1728,10 @@
prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
RNA_def_property_ui_text(prop, "Crop", "");
+
+ prop = RNA_def_property(srna, "transformation", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "strip->transformation");
+ RNA_def_property_ui_text(prop, "Transformation", "");
}
static void rna_def_proxy(StructRNA *srna)
@@ -2180,7 +2239,7 @@
prop = RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Multiply Speed", "Multiply the resulting speed after the speed factor");
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, -1);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
@@ -2196,6 +2255,28 @@
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
+
+static void rna_def_brightcontrast(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list