[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50387] trunk/blender: Sequencer: remove effect mask input

Sergey Sharybin sergey.vfx at gmail.com
Tue Sep 4 15:48:24 CEST 2012


Revision: 50387
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50387
Author:   nazgul
Date:     2012-09-04 13:48:24 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
Sequencer: remove effect mask input

Initial idea of this input was re-designed in a bit more flexible
way using modifiers.
Also since Color Balance (which was the only thing using effect
mask input) was moved to the modifiers, this input field became
rudiment.

It's pretty tricky to write versioning code to prevent possible
data in cases this field was used, but hope it wouldn't be difficult
to switch to modifiers masks.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/makesdna/DNA_sequence_types.h
    trunk/blender/source/blender/makesrna/intern/rna_sequencer.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-09-04 13:37:58 UTC (rev 50386)
+++ trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-09-04 13:48:24 UTC (rev 50387)
@@ -449,7 +449,7 @@
         return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
                               'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
-                              'MULTICAM', 'ADJUSTMENT'}
+                              'MULTICAM'}
 
     def draw(self, context):
         layout = self.layout
@@ -463,10 +463,6 @@
             if strip.input_count > 1:
                 col.prop(strip, "input_2")
 
-        if strip.is_supports_mask:
-            col = layout.column()
-            col.prop_search(strip, "input_mask_strip", sequencer, "sequences", text="Mask")
-
         if strip.type == 'COLOR':
             layout.prop(strip, "color")
 

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2012-09-04 13:37:58 UTC (rev 50386)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2012-09-04 13:48:24 UTC (rev 50387)
@@ -4959,7 +4959,6 @@
 			seq->seq1= newdataadr(fd, seq->seq1);
 			seq->seq2= newdataadr(fd, seq->seq2);
 			seq->seq3= newdataadr(fd, seq->seq3);
-			seq->mask_sequence= newdataadr(fd, seq->mask_sequence);
 			/* a patch: after introduction of effects with 3 input strips */
 			if (seq->seq3 == NULL) seq->seq3 = seq->seq2;
 			

Modified: trunk/blender/source/blender/makesdna/DNA_sequence_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_sequence_types.h	2012-09-04 13:37:58 UTC (rev 50386)
+++ trunk/blender/source/blender/makesdna/DNA_sequence_types.h	2012-09-04 13:48:24 UTC (rev 50387)
@@ -150,9 +150,6 @@
 	/* pointers for effects: */
 	struct Sequence *seq1, *seq2, *seq3;
 
-	/* maks input for effects */
-	struct Sequence *mask_sequence;
-
 	ListBase seqbase;       /* list of strips for metastrips */
 
 	struct bSound *sound;   /* the linked "bSound" object */

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2012-09-04 13:37:58 UTC (rev 50386)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2012-09-04 13:48:24 UTC (rev 50387)
@@ -56,7 +56,6 @@
 	const char *ui_desc;
 	void (*func)(StructRNA *);
 	int inputs;
-	int supports_mask;
 } EffectInfo;
 
 EnumPropertyItem sequence_modifier_type_items[] = {
@@ -586,13 +585,6 @@
 	return BKE_sequence_effect_get_num_inputs(seq->type);
 }
 
-static int rna_Sequence_supports_mask_get(PointerRNA *ptr)
-{
-	Sequence *seq = (Sequence *)(ptr->data);
-
-	return BKE_sequence_effect_get_supports_mask(seq->type);
-}
-
 #if 0
 static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
 {
@@ -620,20 +612,6 @@
 	}
 }
 
-static int rna_Sequence_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
-{
-	Sequence *seq = (Sequence *) ptr->data;
-	Sequence *cur = (Sequence *) value.data;
-
-	if (seq == cur)
-		return FALSE;
-
-	if (BKE_sequence_check_depend(seq, cur))
-		return FALSE;
-
-	return TRUE;
-}
-
 static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
 	Scene *scene = (Scene *) ptr->id.data;
@@ -1674,7 +1652,7 @@
 	RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
 }
 
-static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask)
+static void rna_def_effect_inputs(StructRNA *srna, int count)
 {
 	PropertyRNA *prop;
 
@@ -1682,10 +1660,6 @@
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
 
-	prop = RNA_def_property(srna, "is_supports_mask", PROP_INT, PROP_UNSIGNED);
-	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-	RNA_def_property_int_funcs(prop, "rna_Sequence_supports_mask_get", NULL, NULL);
-
 	if (count >= 1) {
 		prop = RNA_def_property(srna, "input_1",  PROP_POINTER, PROP_NONE);
 		RNA_def_property_pointer_sdna(prop, NULL, "seq1");
@@ -1708,15 +1682,6 @@
 		RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
 	}
 	*/
-
-	if (supports_mask) {
-		prop = RNA_def_property(srna, "input_mask_strip",  PROP_POINTER, PROP_NONE);
-		RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
-		RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Sequence_otherSequence_poll");
-		RNA_def_property_flag(prop, PROP_EDITABLE);
-		RNA_def_property_ui_text(prop, "Mask", "Mask input for the effect strip");
-		RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
-	}
 }
 
 static void rna_def_image(BlenderRNA *brna)
@@ -2157,28 +2122,28 @@
 }
 
 static EffectInfo def_effects[] = {
-	{"AddSequence", "Add Sequence", "Add Sequence", NULL, 2, FALSE},
+	{"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
 	{"AdjustmentSequence", "Adjustment Layer Sequence",
-	 "Sequence strip to perform filter adjustments to layers below", rna_def_input, 0, TRUE},
-	{"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2, FALSE},
-	{"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2, FALSE},
+	 "Sequence strip to perform filter adjustments to layers below", rna_def_input, 0},
+	{"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2},
+	{"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2},
 	{"ColorSequence", "Color Sequence",
-	 "Sequence strip creating an image filled with a single color", rna_def_solid_color, 0, FALSE},
-	{"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2, FALSE},
-	{"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2, FALSE},
-	{"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1, FALSE},
+	 "Sequence strip creating an image filled with a single color", rna_def_solid_color, 0},
+	{"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2},
+	{"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2},
+	{"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1},
 	{"MulticamSequence", "Multicam Select Sequence", "Sequence strip to perform multicam editing",
-	 rna_def_multicam, 0, FALSE},
-	{"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2, FALSE},
-	{"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2, FALSE},
+	 rna_def_multicam, 0},
+	{"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2},
+	{"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2},
 	{"SpeedControlSequence", "SpeedControl Sequence",
-	 "Sequence strip to control the speed of other strips", rna_def_speed_control, 1, FALSE},
-	{"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2, FALSE},
+	 "Sequence strip to control the speed of other strips", rna_def_speed_control, 1},
+	{"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2},
 	{"TransformSequence", "Transform Sequence",
-	 "Sequence strip applying affine transformations to other strips", rna_def_transform, 1, FALSE},
+	 "Sequence strip applying affine transformations to other strips", rna_def_transform, 1},
 	{"WipeSequence", "Wipe Sequence", "Sequence strip creating a wipe transition",
-	 rna_def_wipe, 1, FALSE},
-	{"", "", "", NULL, 0, FALSE}
+	 rna_def_wipe, 1},
+	{"", "", "", NULL, 0}
 };
 
 static void rna_def_effects(BlenderRNA *brna)
@@ -2191,7 +2156,7 @@
 		RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
 		RNA_def_struct_sdna(srna, "Sequence");
 
-		rna_def_effect_inputs(srna, effect->inputs, effect->supports_mask);
+		rna_def_effect_inputs(srna, effect->inputs);
 
 		if (effect->func)
 			effect->func(srna);




More information about the Bf-blender-cvs mailing list