From 6c4ddadc575ac580c85202d3686d1ccc7c6bc259 Mon Sep 17 00:00:00 2001 From: niehongxu116 <58725258+niehongxu116@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=89=E6=9C=9F?= =?UTF-8?q?=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 编辑器三期功能支持 --- client/py/yidong/model.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/client/py/yidong/model.py b/client/py/yidong/model.py index 9d54ec1..ead66d5 100644 --- a/client/py/yidong/model.py +++ b/client/py/yidong/model.py @@ -188,6 +188,7 @@ class BgmConfig(BaseModel): class GlobalEditorConfig(BaseModel): bgm_config: BgmConfig = BgmConfig() + video_fill_effect: str = "black_border" output_width: float | None = None output_height: float | None = None @@ -204,6 +205,12 @@ class EffectBase(BaseModel): duration: float = 0.5 +class EffectConfig(BaseModel): + in_effect: EffectBase = EffectBase() + on_effect: EffectBase = EffectBase() + out_effect: EffectBase = EffectBase() + + class FontBase(BaseModel): text: str = "" font: str = "" @@ -222,7 +229,7 @@ class VoiceoverEditorConfig(FontBase): mask_color: str = "#800080" -class TextoverEditorConfig(FontBase): +class TextoverEditorConfig(FontBase, EffectConfig): rotate: float = 0.0 position_x: float = 0 position_y: float = -1 @@ -231,12 +238,9 @@ class TextoverEditorConfig(FontBase): mask_color: str = "" style: str = "mask" style_value: str = "" - in_effect: EffectBase = EffectBase() - on_effect: EffectBase = EffectBase() - out_effect: EffectBase = EffectBase() -class ImageEditorConfig(BaseModel): +class ImageEditorConfig(EffectConfig): resource_id: str = "" start: float = 0.0 stop: float = 0.0 @@ -244,8 +248,6 @@ class ImageEditorConfig(BaseModel): position_x: float = 0 position_y: float = -1 rotate: float = 0.0 - in_effect: EffectBase = EffectBase() - out_effect: EffectBase = EffectBase() class VideoEditorConfig(BaseModel):