This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
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 #1876 from pypeclub/feature/webpublisher_backend
Feature/webpublisher backend
- Loading branch information
Showing
21 changed files
with
1,305 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Webpublisher | ||
------------- | ||
|
||
Plugins meant for processing of Webpublisher. | ||
|
||
Gets triggered by calling openpype.cli.remotepublish with appropriate arguments. |
Empty file.
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,43 @@ | ||
import os | ||
import logging | ||
|
||
from avalon import api as avalon | ||
from avalon import io | ||
from pyblish import api as pyblish | ||
import openpype.hosts.webpublisher | ||
|
||
log = logging.getLogger("openpype.hosts.webpublisher") | ||
|
||
HOST_DIR = os.path.dirname(os.path.abspath( | ||
openpype.hosts.webpublisher.__file__)) | ||
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins") | ||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish") | ||
LOAD_PATH = os.path.join(PLUGINS_DIR, "load") | ||
CREATE_PATH = os.path.join(PLUGINS_DIR, "create") | ||
|
||
|
||
def application_launch(): | ||
pass | ||
|
||
|
||
def install(): | ||
print("Installing Pype config...") | ||
|
||
pyblish.register_plugin_path(PUBLISH_PATH) | ||
avalon.register_plugin_path(avalon.Loader, LOAD_PATH) | ||
avalon.register_plugin_path(avalon.Creator, CREATE_PATH) | ||
log.info(PUBLISH_PATH) | ||
|
||
io.install() | ||
avalon.on("application.launched", application_launch) | ||
|
||
|
||
def uninstall(): | ||
pyblish.deregister_plugin_path(PUBLISH_PATH) | ||
avalon.deregister_plugin_path(avalon.Loader, LOAD_PATH) | ||
avalon.deregister_plugin_path(avalon.Creator, CREATE_PATH) | ||
|
||
|
||
# to have required methods for interface | ||
def ls(): | ||
pass |
28 changes: 28 additions & 0 deletions
28
openpype/hosts/webpublisher/plugins/publish/collect_fps.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,28 @@ | ||
""" | ||
Requires: | ||
Nothing | ||
Provides: | ||
Instance | ||
""" | ||
|
||
import pyblish.api | ||
from pprint import pformat | ||
|
||
|
||
class CollectFPS(pyblish.api.InstancePlugin): | ||
""" | ||
Adds fps from context to instance because of ExtractReview | ||
""" | ||
|
||
label = "Collect fps" | ||
order = pyblish.api.CollectorOrder + 0.49 | ||
hosts = ["webpublisher"] | ||
|
||
def process(self, instance): | ||
fps = instance.context.data["fps"] | ||
|
||
instance.data.update({ | ||
"fps": fps | ||
}) | ||
self.log.debug(f"instance.data: {pformat(instance.data)}") |
Oops, something went wrong.