[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25326] trunk/blender: Sequencer: Transform Strip updates (Durian wish)

Andrea Weikert elubie at gmx.net
Fri Dec 11 23:51:54 CET 2009


Revision: 25326
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25326
Author:   elubie
Date:     2009-12-11 23:51:53 +0100 (Fri, 11 Dec 2009)

Log Message:
-----------
Sequencer: Transform Strip updates (Durian wish)

Removed the Start/End Settings and the effect_fader from the sequencer transform strip. 
The transform strip can now only be animated directly by keying the Scale X, Scale Y, Translate X, Translate Y and Rotation values.

Caveat:
The uniform scale re-uses the Scale X value, so when changing the animation on Scale X in the non-uniform scaling case, the uniform scaling will be affected too. This was done to not break files for Durian. 

Note:
As much as I would have liked to clean up the TransformVars, it caused crashes of earlier versions of blender when opening the file.
The rna identifiers were also kept as to not break any existing animation on those keys.

Modified Paths:
--------------
    trunk/blender/projectfiles_vc9/blender/blender.vcproj
    trunk/blender/release/scripts/ui/space_sequencer.py
    trunk/blender/source/blender/blenkernel/BKE_sequence.h
    trunk/blender/source/blender/blenkernel/intern/seqeffects.c
    trunk/blender/source/blender/blenkernel/intern/sequence.c
    trunk/blender/source/blender/makesdna/DNA_sequence_types.h
    trunk/blender/source/blender/makesrna/intern/rna_sequence.c

Modified: trunk/blender/projectfiles_vc9/blender/blender.vcproj
===================================================================
--- trunk/blender/projectfiles_vc9/blender/blender.vcproj	2009-12-11 19:27:47 UTC (rev 25325)
+++ trunk/blender/projectfiles_vc9/blender/blender.vcproj	2009-12-11 22:51:53 UTC (rev 25326)
@@ -221,45 +221,45 @@
 				RelativePath="..\..\source\icons\winblenderfile.ico"
 				>
 			</File>
-			<Filter
-				Name="Source Files"
-				Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-				>
-				<File
-					RelativePath="..\..\source\creator\buildinfo.c"
-					>
-				</File>
-				<File
-					RelativePath="..\..\source\creator\creator.c"
-					>
-				</File>
-				<File
-					RelativePath="..\..\source\icons\winblender.rc"
-					>
-					<FileConfiguration
-						Name="Blender Release|Win32"
-						>
-						<Tool
-							Name="VCResourceCompilerTool"
-							AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Blender Debug|Win32"
-						>
-						<Tool
-							Name="VCResourceCompilerTool"
-							AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
-						/>
-					</FileConfiguration>
-				</File>
-			</Filter>
 		</Filter>
 		<Filter
 			Name="Header Files"
 			Filter="h;hpp;hxx;hm;inl"
 			>
 		</Filter>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\..\source\creator\buildinfo.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\source\creator\creator.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\source\icons\winblender.rc"
+				>
+				<FileConfiguration
+					Name="Blender Release|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Blender Debug|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
 	</Files>
 	<Globals>
 	</Globals>

Modified: trunk/blender/release/scripts/ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/ui/space_sequencer.py	2009-12-11 19:27:47 UTC (rev 25325)
+++ trunk/blender/release/scripts/ui/space_sequencer.py	2009-12-11 22:51:53 UTC (rev 25326)
@@ -383,59 +383,48 @@
             flow.prop(strip, "frame_blending")
 
         elif strip.type == 'TRANSFORM':
-
-            col = layout.column()
-            col.prop(strip, "interpolation")
-            col.prop(strip, "translation_unit")
-
-            col = layout.column(align=True)
-            col.label(text="Position X:")
-            col.prop(strip, "translate_start_x", text="Start")
-            col.prop(strip, "translate_end_x", text="End")
-
-            col = layout.column(align=True)
-            col.label(text="Position Y:")
-            col.prop(strip, "translate_start_y", text="Start")
-            col.prop(strip, "translate_end_y", text="End")
-
-            layout.separator()
-
-            col = layout.column(align=True)
-            col.prop(strip, "uniform_scale")
+            self.draw_panel_transform(strip)
             
-            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")
-
-            layout.separator()
-
-            col = layout.column(align=True)
-            col.label(text="Rotation:")
-            col.prop(strip, "rotation_start", text="Start")
-            col.prop(strip, "rotation_end", text="End")
-
         col = layout.column(align=True)
         if strip.type == 'SPEED':
             col.prop(strip, "speed_fader", text="Speed fader")
-        elif strip.type in ('CROSS', 'GAMMA_CROSS', 'PLUGIN', 'WIPE',
-                            'TRANSFORM'):
+        elif strip.type in ('CROSS', 'GAMMA_CROSS', 'PLUGIN', 'WIPE'):
                 col.prop(strip, "use_effect_default_fade", "Default fade")
                 if not strip.use_effect_default_fade:
                     col.prop(strip, "effect_fader", text="Effect fader")
+    
+    def draw_panel_transform(self, strip):
+        layout = self.layout
+        col = layout.column()
+        
+        col.prop(strip, "interpolation")
+        col.prop(strip, "translation_unit")
+        col = layout.column(align=True)
+        col.label(text="Position:")
+        col.prop(strip, "translate_start_x", text="X")
+        col.prop(strip, "translate_start_y", text="Y")
 
+        layout.separator()
 
+        col = layout.column(align=True)
+        col.prop(strip, "uniform_scale")
+        if (strip.uniform_scale):
+            col = layout.column(align=True)
+            col.prop(strip, "scale_start_x", text="Scale")
+        else:
+            col = layout.column(align=True)
+            col.label(text="Scale:")
+            col.prop(strip, "scale_start_x", text="X")
+            col.prop(strip, "scale_start_y", text="Y")
+
+        layout.separator()
+
+        col = layout.column(align=True)
+        col.label(text="Rotation:")
+        col.prop(strip, "rotation_start", text="Rotation")
+
+
 class SEQUENCER_PT_input(SequencerButtonsPanel):
     bl_label = "Strip Input"
 

Modified: trunk/blender/source/blender/blenkernel/BKE_sequence.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_sequence.h	2009-12-11 19:27:47 UTC (rev 25325)
+++ trunk/blender/source/blender/blenkernel/BKE_sequence.h	2009-12-11 22:51:53 UTC (rev 25326)
@@ -125,7 +125,7 @@
 		float-rects or byte-rects 
 		(mixed cases are handled one layer up...) */
 	
-	void (*execute)(struct Sequence *seq, int cfra,
+	void (*execute)(struct Scene *scene, struct Sequence *seq, int cfra,
 					float facf0, float facf1,
 					int x, int y,
 					struct ImBuf *ibuf1, struct ImBuf *ibuf2,

Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c	2009-12-11 19:27:47 UTC (rev 25325)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c	2009-12-11 22:51:53 UTC (rev 25326)
@@ -231,7 +231,7 @@
 	return (ImBuf*) (((void**) i) + 2);
 }
 
-static void do_plugin_effect(Sequence * seq,int cfra,
+static void do_plugin_effect(Scene *scene, Sequence *seq, int cfra,
 			     float facf0, float facf1, int x, int y, 
 			     struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			     struct ImBuf *ibuf3, struct ImBuf *out)
@@ -477,7 +477,7 @@
 	}
 }
 
-static void do_alphaover_effect(Sequence * seq,int cfra,
+static void do_alphaover_effect(Scene *scene, Sequence *seq, int cfra,
 				float facf0, float facf1, int x, int y, 
 				struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 				struct ImBuf *ibuf3, struct ImBuf *out)
@@ -644,7 +644,7 @@
 	}
 }
 
-static void do_alphaunder_effect(Sequence * seq,int cfra,
+static void do_alphaunder_effect(Scene *scene, Sequence *seq, int cfra,
 				float facf0, float facf1, int x, int y, 
 				struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 				struct ImBuf *ibuf3, struct ImBuf *out)
@@ -764,7 +764,7 @@
 
 /* carefull: also used by speed effect! */
 
-static void do_cross_effect(Sequence * seq,int cfra,
+static void do_cross_effect(Scene *scene, Sequence *seq, int cfra,
 			    float facf0, float facf1, int x, int y, 
 			    struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			    struct ImBuf *ibuf3, struct ImBuf *out)
@@ -1026,7 +1026,7 @@
 	}
 }
 
-static void do_gammacross_effect(Sequence * seq,int cfra,
+static void do_gammacross_effect(Scene *scene, Sequence *seq, int cfra,
 				 float facf0, float facf1, int x, int y, 
 				 struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 				 struct ImBuf *ibuf3, struct ImBuf *out)
@@ -1140,7 +1140,7 @@
 	}
 }
 
-static void do_add_effect(Sequence * seq,int cfra,
+static void do_add_effect(Scene *scene, Sequence *seq, int cfra,
 			  float facf0, float facf1, int x, int y, 
 			  struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			  struct ImBuf *ibuf3, struct ImBuf *out)
@@ -1252,7 +1252,7 @@
 	}
 }
 
-static void do_sub_effect(Sequence * seq,int cfra,
+static void do_sub_effect(Scene *scene, Sequence *seq, int cfra,
 			  float facf0, float facf1, int x, int y, 
 			  struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			  struct ImBuf *ibuf3, struct ImBuf *out)
@@ -1360,7 +1360,7 @@
 }
 
 
-static void do_drop_effect(Sequence * seq,int cfra,
+static void do_drop_effect(Scene *scene, Sequence *seq, int cfra,
 			   float facf0, float facf1, int x, int y, 
 			   struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			   struct ImBuf * ibuf3,
@@ -1481,7 +1481,7 @@
 	}
 }
 
-static void do_mul_effect(Sequence * seq,int cfra,
+static void do_mul_effect(Scene *scene, Sequence *seq, int cfra,
 			  float facf0, float facf1, int x, int y, 
 			  struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			  struct ImBuf *ibuf3, struct ImBuf *out)
@@ -1931,7 +1931,7 @@
 	}
 }
 
-static void do_wipe_effect(Sequence * seq,int cfra,
+static void do_wipe_effect(Scene *scene, Sequence *seq, int cfra,
 			   float facf0, float facf1, int x, int y, 
 			   struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
 			   struct ImBuf *ibuf3, struct ImBuf *out)
@@ -1953,27 +1953,29 @@
    ********************************************************************** */
 static void init_transform_effect(Sequence *seq)
 {
-	TransformVars *scale;
+	TransformVars *transform;
 
 	if(seq->effectdata)MEM_freeN(seq->effectdata);
 	seq->effectdata = MEM_callocN(sizeof(struct TransformVars), "transformvars");
 
-	scale = (TransformVars *)seq->effectdata;
-	scale->ScalexIni = 1;
-	scale->ScaleyIni = 1;
-	scale->ScalexFin = 1;
-	scale->ScaleyFin = 1;

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list