forked from nfa-vfxim/tk-desktop-deliveries
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from planetx-vfx/feature/FP-81/add-frame-deliv…
…ery-compression-choice FP-81 Add choice for frames delivery compression
- Loading branch information
Showing
11 changed files
with
536 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import json | ||
|
||
|
||
class SequenceOutput: | ||
name: str | ||
extension: str | ||
status: str | ||
settings: dict | ||
|
||
def __init__(self, name: str, extension: str, status: str, settings: dict): | ||
self.name = name | ||
self.extension = extension | ||
self.status = status | ||
self.settings = settings | ||
|
||
def to_cli_string(self): | ||
return json.dumps({**self.settings, "file_type": self.extension}) | ||
|
||
@staticmethod | ||
def from_dict(data: dict): | ||
"""Get a SequenceOutput from a dict""" | ||
return SequenceOutput( | ||
data["name"], | ||
data["extension"], | ||
data["status"], | ||
data["settings"], | ||
) | ||
|
||
def __eq__(self, other): | ||
if not isinstance(other, SequenceOutput): | ||
return NotImplemented | ||
|
||
return ( | ||
self.name == other.name | ||
and self.extension == other.extension | ||
and self.status == other.status | ||
and self.settings == other.settings | ||
) | ||
|
||
def __str__(self): | ||
return f"<SequenceOutput {self.name} ext={self.extension} status={self.status} settings={self.settings}>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.