generated from ynput/ayon-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 3
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 #11 from ynput/enhancement/AY-5780_Resolve-enhanci…
…ng-editorial-pkg-loader Resolve: enhancing editorial pkg loader
- Loading branch information
Showing
5 changed files
with
220 additions
and
9 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
31 changes: 31 additions & 0 deletions
31
client/ayon_resolve/plugins/create/create_editorial_package.py
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,31 @@ | ||
import json | ||
from ayon_core.pipeline.create.legacy_create import LegacyCreator | ||
|
||
from ayon_resolve.api import lib | ||
|
||
|
||
class CreateEditorialPackage(LegacyCreator): | ||
"""Create Editorial Package.""" | ||
|
||
name = "editorial_pkg" | ||
label = "Editorial Package" | ||
product_type = "editorial_pkg" | ||
icon = "camera" | ||
defaults = ["Main"] | ||
|
||
def process(self): | ||
"""Process the creation of the editorial package.""" | ||
current_timeline = lib.get_current_timeline() | ||
|
||
if not current_timeline: | ||
raise RuntimeError("Make sure to have an active current timeline.") | ||
|
||
timeline_media_pool_item = lib.get_timeline_media_pool_item( | ||
current_timeline | ||
) | ||
|
||
publish_data = {"publish": self.data} | ||
|
||
timeline_media_pool_item.SetMetadata( | ||
lib.pype_tag_name, json.dumps(publish_data) | ||
) |
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