[Bf-blender-cvs] [6b3eca661dc] master: Revert "VSE: Media transform redesign"
Richard Antalik
noreply at git.blender.org
Mon Nov 2 21:00:09 CET 2020
Commit: 6b3eca661dc2d0791ecf07b94ef51f13c3aa6d25
Author: Richard Antalik
Date: Mon Nov 2 20:59:21 2020 +0100
Branches: master
https://developer.blender.org/rB6b3eca661dc2d0791ecf07b94ef51f13c3aa6d25
Revert "VSE: Media transform redesign"
This reverts commit 0277579b2850f0ba097741ca22eb8ae9ccd9bcea.
This commit caused build errors on Linux.
===================================================================
M release/scripts/startup/bl_ui/space_sequencer.py
M source/blender/blenkernel/BKE_blender_version.h
M source/blender/blenlib/BLI_math_matrix.h
M source/blender/blenlib/intern/math_matrix.c
M source/blender/blenloader/intern/versioning_290.c
M source/blender/imbuf/IMB_imbuf.h
M source/blender/imbuf/intern/rectop.c
M source/blender/makesdna/DNA_sequence_types.h
M source/blender/makesrna/intern/rna_sequencer.c
M source/blender/sequencer/SEQ_sequencer.h
M source/blender/sequencer/intern/sequencer.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 0171fa902db..7d881948466 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -949,28 +949,54 @@ class SEQUENCER_PT_strip(SequencerButtonsPanel, Panel):
row.prop(strip, "mute", toggle=True, icon_only=True, emboss=False)
-class SEQUENCER_PT_adjust_crop(SequencerButtonsPanel, Panel):
- bl_label = "Crop"
+class SEQUENCER_PT_adjust_transform_offset(SequencerButtonsPanel, Panel):
+ bl_label = "Offset"
+ bl_parent_id = "SEQUENCER_PT_adjust_transform"
bl_options = {'DEFAULT_CLOSED'}
bl_category = "Strip"
@classmethod
def poll(cls, context):
- if not cls.has_sequencer(context):
- return False
+ strip = act_strip(context)
+ return strip.type != 'SOUND'
+ def draw_header(self, context):
strip = act_strip(context)
- if not strip:
- return False
+ self.layout.prop(strip, "use_translation", text="")
+
+ def draw(self, context):
+ strip = act_strip(context)
+ layout = self.layout
+ layout.use_property_split = True
+
+ layout.active = strip.use_translation and (not strip.mute)
+
+ col = layout.column(align=True)
+ col.prop(strip.transform, "offset_x", text="Position X")
+ col.prop(strip.transform, "offset_y", text="Y")
+
+class SEQUENCER_PT_adjust_transform_crop(SequencerButtonsPanel, Panel):
+ bl_label = "Crop"
+ bl_parent_id = "SEQUENCER_PT_adjust_transform"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_category = "Strip"
+
+ @classmethod
+ def poll(cls, context):
strip = act_strip(context)
return strip.type != 'SOUND'
+ def draw_header(self, context):
+ strip = act_strip(context)
+ self.layout.prop(strip, "use_crop", text="")
+
def draw(self, context):
strip = act_strip(context)
layout = self.layout
layout.use_property_split = True
- layout.active = not strip.mute
+
+ layout.active = strip.use_crop and (not strip.mute)
col = layout.column(align=True)
col.prop(strip.crop, "min_x")
@@ -1564,19 +1590,21 @@ class SEQUENCER_PT_time(SequencerButtonsPanel, Panel):
split.label(text="%d-%d (%d)" % (sta, end, end - sta + 1), translate=False)
+class SEQUENCER_PT_adjust(SequencerButtonsPanel, Panel):
+ bl_label = "Adjust"
+ bl_category = "Strip"
+
+ def draw(self, context):
+ pass
+
+
class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel):
bl_label = "Sound"
+ bl_parent_id = "SEQUENCER_PT_adjust"
bl_category = "Strip"
@classmethod
def poll(cls, context):
- if not cls.has_sequencer(context):
- return False
-
- strip = act_strip(context)
- if not strip:
- return False
-
strip = act_strip(context)
return strip.type == 'SOUND'
@@ -1608,17 +1636,11 @@ class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_adjust_comp(SequencerButtonsPanel, Panel):
bl_label = "Compositing"
+ bl_parent_id = "SEQUENCER_PT_adjust"
bl_category = "Strip"
@classmethod
def poll(cls, context):
- if not cls.has_sequencer(context):
- return False
-
- strip = act_strip(context)
- if not strip:
- return False
-
strip = act_strip(context)
return strip.type != 'SOUND'
@@ -1637,8 +1659,8 @@ class SEQUENCER_PT_adjust_comp(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, Panel):
bl_label = "Transform"
+ bl_parent_id = "SEQUENCER_PT_adjust"
bl_category = "Strip"
- bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
@@ -1649,25 +1671,22 @@ class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, Panel):
if not strip:
return False
- strip = act_strip(context)
- return strip.type != 'SOUND'
+ return strip.type in {
+ 'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'MASK',
+ 'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'TEXT',
+ 'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
+ 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
+ 'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
+ }
def draw(self, context):
- strip = act_strip(context)
layout = self.layout
- layout.use_property_split = True
- layout.active = not strip.mute
-
- col = layout.column(align=True)
- col.prop(strip.transform, "offset_x", text="Position X")
- col.prop(strip.transform, "offset_y", text="Y")
+ strip = act_strip(context)
- col = layout.column(align=True)
- col.prop(strip.transform, "scale_x", text="Scale X")
- col.prop(strip.transform, "scale_y", text="Y")
+ layout.use_property_split = True
+ layout.use_property_decorate = False
- col = layout.column(align=True)
- col.prop(strip.transform, "rotation", text="Rotation")
+ layout.active = not strip.mute
row = layout.row(heading="Mirror")
sub = row.row(align=True)
@@ -1677,6 +1696,7 @@ class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_adjust_video(SequencerButtonsPanel, Panel):
bl_label = "Video"
+ bl_parent_id = "SEQUENCER_PT_adjust"
bl_options = {'DEFAULT_CLOSED'}
bl_category = "Strip"
@@ -1725,6 +1745,7 @@ class SEQUENCER_PT_adjust_video(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_adjust_color(SequencerButtonsPanel, Panel):
bl_label = "Color"
+ bl_parent_id = "SEQUENCER_PT_adjust"
bl_options = {'DEFAULT_CLOSED'}
bl_category = "Strip"
@@ -2213,9 +2234,11 @@ classes = (
SEQUENCER_PT_effect_text_style,
SEQUENCER_PT_effect_text_layout,
+ SEQUENCER_PT_adjust,
SEQUENCER_PT_adjust_comp,
SEQUENCER_PT_adjust_transform,
- SEQUENCER_PT_adjust_crop,
+ SEQUENCER_PT_adjust_transform_offset,
+ SEQUENCER_PT_adjust_transform_crop,
SEQUENCER_PT_adjust_video,
SEQUENCER_PT_adjust_color,
SEQUENCER_PT_adjust_sound,
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index 289caae7f94..59e6b5629f0 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -39,7 +39,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
-#define BLENDER_FILE_SUBVERSION 2
+#define BLENDER_FILE_SUBVERSION 1
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and show a warning if the file
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index d971f48c4cf..9f6c56d698a 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -322,13 +322,9 @@ void mat4_to_size(float size[3], const float M[4][4]);
void mat4_to_size_fix_shear(float size[3], const float M[4][4]);
-void translate_m3(float mat[3][3], float tx, float ty);
void translate_m4(float mat[4][4], float tx, float ty, float tz);
-void rotate_m3(float mat[3][3], const float angle);
void rotate_m4(float mat[4][4], const char axis, const float angle);
-void rescale_m3(float mat[3][3], const float scale[2]);
void rescale_m4(float mat[4][4], const float scale[3]);
-void transform_pivot_set_m3(float mat[3][3], const float pivot[2]);
void transform_pivot_set_m4(float mat[4][4], const float pivot[3]);
void mat3_to_rot_size(float rot[3][3], float size[3], const float mat3[3][3]);
@@ -338,10 +334,6 @@ void mat4_decompose(float loc[3], float quat[4], float size[3], const float wmat
void mat3_polar_decompose(const float mat3[3][3], float r_U[3][3], float r_P[3][3]);
-void loc_rot_size_to_mat3(float R[3][3],
- const float loc[2],
- const float angle,
- const float size[2]);
void loc_rot_size_to_mat4(float R[4][4],
const float loc[3],
const float rot[3][3],
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 9769d2baf9b..cf6945529f2 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -2223,12 +2223,6 @@ void scale_m4_fl(float R[4][4], float scale)
R[3][0] = R[3][1] = R[3][2] = 0.0;
}
-void translate_m3(float mat[3][3], float tx, float ty)
-{
- mat[2][0] += (tx * mat[0][0] + ty * mat[1][0]);
- mat[2][1] += (tx * mat[0][1] + ty * mat[1][1]);
-}
-
void translate_m4(float mat[4][4], float Tx, float Ty, float Tz)
{
mat[3][0] += (Tx * mat[0][0] + Ty * mat[1][0] + Tz * mat[2][0]);
@@ -2236,18 +2230,6 @@ void translate_m4(float mat[4][4], float Tx, float Ty, float Tz)
mat[3][2] += (Tx * mat[0][2] + Ty * mat[1][2] + Tz * mat[2][2]);
}
-void rotate_m3(float mat[3][3], const float angle)
-{
- const float angle_cos = cosf(angle);
- const float angle_sin = sinf(angle);
-
- for (int col = 0; col < 3; col++) {
- float temp = angle_cos * mat[0][col] + angle_sin * mat[1][col];
- mat[1][col] = -angle_sin * mat[0][col] + angle_cos * mat[1][col];
- mat[0][col] = temp;
- }
-}
-
/* TODO: enum for axis? */
/**
* Rotate a matrix in-place.
@@ -2293,12 +2275,6 @@ void rotate_m4(float mat[4][4], const char axis, const float angle)
}
}
-void rescale_m3(float mat[3][3], const float scale[2])
-{
- mul_v3_fl(mat[0], scale[0]);
- mul_v3_fl(mat[1], scale[1]);
-}
-
/** Scale a matrix in-place. */
void rescale_m4(float mat[4][4], const float scale[3])
{
@@ -2329,20 +2305,6 @@ void transform_pivot_set_m4(float mat[4][4], const float pivot[3])
mul_m4_m4m4(mat, mat, tmat);
}
-void transform_pivot_set_m3(float mat[3][3], const float pivot[2])
-{
- float tmat[3][3];
-
- unit_m3(tmat);
-
- copy_v2_v2(tmat[2], pivot);
- mul_m3
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list