mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 08:50:54 +00:00
Compare commits
3 Commits
637f4ab9a4
...
1b0ccd4ef7
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b0ccd4ef7 | |||
| 498d5c8fea | |||
| af5d937aeb |
@@ -37,7 +37,7 @@ The `pycmx` package parses a CMX 3600 EDL and its most most common variations.
|
|||||||
### Opening and Parsing EDL Files
|
### Opening and Parsing EDL Files
|
||||||
```
|
```
|
||||||
>>> import pycmx
|
>>> import pycmx
|
||||||
>>> with open("tests/edls/TEST.edl") as f
|
>>> with open("tests/edls/TEST.edl") as f:
|
||||||
... edl = pycmx.parse_cmx3600(f)
|
... edl = pycmx.parse_cmx3600(f)
|
||||||
...
|
...
|
||||||
>>> edl.title
|
>>> edl.title
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ class Edit:
|
|||||||
asc_sat_statement: Optional[StmtCdlSat] = None,
|
asc_sat_statement: Optional[StmtCdlSat] = None,
|
||||||
frmc_statement: Optional[StmtFrmc] = None,
|
frmc_statement: Optional[StmtFrmc] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
# Assigning types for the attributes explicitly
|
|
||||||
self._edit_statement: StmtEvent = edit_statement
|
self._edit_statement: StmtEvent = edit_statement
|
||||||
self._audio_ext: Optional[StmtAudioExt] = audio_ext_statement
|
self._audio_ext: Optional[StmtAudioExt] = audio_ext_statement
|
||||||
self._clip_name_statement: Optional[StmtClipName] = clip_name_statement
|
self._clip_name_statement: Optional[StmtClipName] = clip_name_statement
|
||||||
@@ -51,8 +50,8 @@ class Edit:
|
|||||||
def line_number(self) -> int:
|
def line_number(self) -> int:
|
||||||
"""
|
"""
|
||||||
Get the line number for the "standard form" statement associated with
|
Get the line number for the "standard form" statement associated with
|
||||||
this edit. Line numbers a zero-indexed, such that the
|
this edit. Line numbers a zero-indexed, such that the "TITLE:" record
|
||||||
"TITLE:" record is line zero.
|
is line zero.
|
||||||
"""
|
"""
|
||||||
return self._edit_statement.line_number
|
return self._edit_statement.line_number
|
||||||
|
|
||||||
@@ -180,7 +179,7 @@ class Edit:
|
|||||||
@property
|
@property
|
||||||
def asc_sop_raw(self) -> Optional[str]:
|
def asc_sop_raw(self) -> Optional[str]:
|
||||||
"""
|
"""
|
||||||
ASC CDL Slope-Offset-Power statement raw line
|
ASC CDL Slope-Offset-Power statement raw line.
|
||||||
"""
|
"""
|
||||||
if self._asc_sop_statement is None:
|
if self._asc_sop_statement is None:
|
||||||
return None
|
return None
|
||||||
@@ -190,7 +189,7 @@ class Edit:
|
|||||||
@property
|
@property
|
||||||
def asc_sat(self) -> Optional[float]:
|
def asc_sat(self) -> Optional[float]:
|
||||||
"""
|
"""
|
||||||
Get ASC CDL saturation value for clip, if present
|
Get ASC CDL saturation value for clip, if present.
|
||||||
"""
|
"""
|
||||||
if self._asc_sat_statement is None:
|
if self._asc_sat_statement is None:
|
||||||
return None
|
return None
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from typing import Any, Generator
|
|||||||
class EditList:
|
class EditList:
|
||||||
"""
|
"""
|
||||||
Represents an entire edit decision list as returned by
|
Represents an entire edit decision list as returned by
|
||||||
:func:`~pycmx.parse_cmx3600()`.
|
:func:`~pycmx.parse_cmx_events.parse_cmx3600()`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, statements: list):
|
def __init__(self, statements: list):
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ from typing import Any, NamedTuple
|
|||||||
|
|
||||||
from .cdl import AscSopComponents
|
from .cdl import AscSopComponents
|
||||||
|
|
||||||
# type str = str
|
|
||||||
|
|
||||||
|
|
||||||
class StmtTitle(NamedTuple):
|
class StmtTitle(NamedTuple):
|
||||||
title: str
|
title: str
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class Transition:
|
|||||||
@property
|
@property
|
||||||
def kind(self) -> Optional[str]:
|
def kind(self) -> Optional[str]:
|
||||||
"""
|
"""
|
||||||
Return the kind of transition: Cut, Wipe, etc
|
Return the kind of transition: Cut, Wipe, etc.
|
||||||
"""
|
"""
|
||||||
if self.cut:
|
if self.cut:
|
||||||
return Transition.Cut
|
return Transition.Cut
|
||||||
@@ -56,7 +56,8 @@ class Transition:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def effect_duration(self) -> int:
|
def effect_duration(self) -> int:
|
||||||
"""The duration of this transition, in frames of the record target.
|
"""
|
||||||
|
The duration of this transition, in frames of the record target.
|
||||||
|
|
||||||
In the event of a key event, this is the duration of the fade in.
|
In the event of a key event, this is the duration of the fade in.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user