feat: permitido testar plano somente com zoom reconstruindo a mídi
- permitido testar plano somente com zoom reconstruindo a mídia completa antes da camada de ajuste Resumo: - 1 arquivos alterados - 0 novos - 1 modificados - 0 removidos 1 file changed, 18 insertions(+), 6 deletions(-) Arquivos: - code/engine/aplicar_montagem_incremental_prototipo.py
This commit is contained in:
@@ -52,6 +52,13 @@ def preparar_intervalos(
|
|||||||
for acao in plano["actions"]
|
for acao in plano["actions"]
|
||||||
if isinstance(acao, dict) and acao.get("kind") in {"cut", "hook"}
|
if isinstance(acao, dict) and acao.get("kind") in {"cut", "hook"}
|
||||||
]
|
]
|
||||||
|
if not acoes:
|
||||||
|
return [{
|
||||||
|
"in_seconds": 0.0,
|
||||||
|
"out_seconds": duracao_da_midia,
|
||||||
|
"destination_seconds": 0.0,
|
||||||
|
"label": "mídia completa",
|
||||||
|
}]
|
||||||
insercoes = PlanejadorDeMontagemIncremental(duracao_da_midia).planejar(acoes)
|
insercoes = PlanejadorDeMontagemIncremental(duracao_da_midia).planejar(acoes)
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -86,20 +93,25 @@ def executar(caminho_do_plano: Path) -> dict[str, object]:
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
if plano.get("test_adjustment_layer") is True:
|
if plano.get("test_adjustment_layer") is True:
|
||||||
gancho = next(
|
alvo = next(
|
||||||
(
|
(
|
||||||
acao
|
acao
|
||||||
for acao in plano["actions"]
|
for acao in plano["actions"]
|
||||||
if isinstance(acao, dict) and acao.get("kind") == "hook"
|
if isinstance(acao, dict) and acao.get("kind") in {"hook", "zoom"}
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
if gancho is None:
|
if alvo is None:
|
||||||
raise ErroDeMontagemIncremental(
|
raise ErroDeMontagemIncremental(
|
||||||
"O teste da adjustment layer exige uma ação hook no plano."
|
"O teste da adjustment layer exige uma ação hook ou zoom no plano."
|
||||||
)
|
)
|
||||||
inicio_do_gancho = 0.0
|
eh_gancho = alvo.get("kind") == "hook"
|
||||||
fim_do_gancho = float(gancho["end"]) - float(gancho["start"])
|
inicio_do_gancho = 0.0 if eh_gancho else float(alvo["start"])
|
||||||
|
fim_do_gancho = (
|
||||||
|
float(alvo["end"]) - float(alvo["start"])
|
||||||
|
if eh_gancho
|
||||||
|
else float(alvo["end"])
|
||||||
|
)
|
||||||
camada = cliente.chamar(
|
camada = cliente.chamar(
|
||||||
"insert_adjustment_layer_range",
|
"insert_adjustment_layer_range",
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user