Merge pull request #617 from pypeclub/feature/616-convert-nukestudio-to-hiero-host
Renaming nukestudio host folder to hiero
|
|
@ -31,17 +31,17 @@ __all__ = [
|
|||
]
|
||||
|
||||
# get logger
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
log = Logger().get_logger(__name__, "hiero")
|
||||
|
||||
|
||||
''' Creating all important host related variables '''
|
||||
AVALON_CONFIG = os.getenv("AVALON_CONFIG", "pype")
|
||||
|
||||
# plugin root path
|
||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "nukestudio", "publish")
|
||||
LOAD_PATH = os.path.join(PLUGINS_DIR, "nukestudio", "load")
|
||||
CREATE_PATH = os.path.join(PLUGINS_DIR, "nukestudio", "create")
|
||||
INVENTORY_PATH = os.path.join(PLUGINS_DIR, "nukestudio", "inventory")
|
||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "hiero", "publish")
|
||||
LOAD_PATH = os.path.join(PLUGINS_DIR, "hiero", "load")
|
||||
CREATE_PATH = os.path.join(PLUGINS_DIR, "hiero", "create")
|
||||
INVENTORY_PATH = os.path.join(PLUGINS_DIR, "hiero", "inventory")
|
||||
|
||||
# registering particular pyblish gui but `lite` is recomended!!
|
||||
if os.getenv("PYBLISH_GUI", None):
|
||||
|
|
@ -50,7 +50,7 @@ if os.getenv("PYBLISH_GUI", None):
|
|||
|
||||
def install():
|
||||
"""
|
||||
Installing Nukestudio integration for avalon
|
||||
Installing Hiero integration for avalon
|
||||
|
||||
Args:
|
||||
config (obj): avalon config module `pype` in our case, it is not
|
||||
|
|
@ -61,8 +61,8 @@ def install():
|
|||
# adding all events
|
||||
_register_events()
|
||||
|
||||
log.info("Registering NukeStudio plug-ins..")
|
||||
pyblish.register_host("nukestudio")
|
||||
log.info("Registering Hiero plug-ins..")
|
||||
pyblish.register_host("hiero")
|
||||
pyblish.register_plugin_path(PUBLISH_PATH)
|
||||
avalon.register_plugin_path(avalon.Loader, LOAD_PATH)
|
||||
avalon.register_plugin_path(avalon.Creator, CREATE_PATH)
|
||||
|
|
@ -87,11 +87,11 @@ def install():
|
|||
|
||||
def uninstall():
|
||||
"""
|
||||
Uninstalling Nukestudio integration for avalon
|
||||
Uninstalling Hiero integration for avalon
|
||||
|
||||
"""
|
||||
log.info("Deregistering NukeStudio plug-ins..")
|
||||
pyblish.deregister_host("nukestudio")
|
||||
log.info("Deregistering Hiero plug-ins..")
|
||||
pyblish.deregister_host("hiero")
|
||||
pyblish.deregister_plugin_path(PUBLISH_PATH)
|
||||
avalon.deregister_plugin_path(avalon.Loader, LOAD_PATH)
|
||||
avalon.deregister_plugin_path(avalon.Creator, CREATE_PATH)
|
||||
|
|
@ -102,7 +102,7 @@ def _register_events():
|
|||
Adding all callbacks.
|
||||
"""
|
||||
|
||||
# if task changed then change notext of nukestudio
|
||||
# if task changed then change notext of hiero
|
||||
avalon.on("taskChanged", _update_menu_task_label)
|
||||
log.info("Installed event callback for 'taskChanged'..")
|
||||
|
||||
|
|
@ -4,7 +4,7 @@ from pype.api import Logger
|
|||
from .lib import sync_avalon_data_to_workfile, launch_workfiles_app
|
||||
from .tags import add_tags_from_presets
|
||||
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
log = Logger().get_logger(__name__, "hiero")
|
||||
|
||||
|
||||
def startupCompleted(event):
|
||||
|
|
@ -8,7 +8,7 @@ from avalon.vendor.Qt import (QtWidgets, QtGui)
|
|||
import pype.api as pype
|
||||
from pype.api import Logger, Anatomy
|
||||
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
log = Logger().get_logger(__name__, "hiero")
|
||||
|
||||
cached_process = None
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ def sync_avalon_data_to_workfile():
|
|||
|
||||
def launch_workfiles_app(event):
|
||||
"""
|
||||
Event for launching workfiles after nukestudio start
|
||||
Event for launching workfiles after hiero start
|
||||
|
||||
Args:
|
||||
event (obj): required but unused
|
||||
|
|
@ -109,9 +109,9 @@ def reload_config():
|
|||
"pypeapp",
|
||||
"{}.api".format(AVALON_CONFIG),
|
||||
"{}.templates".format(AVALON_CONFIG),
|
||||
"{}.hosts.nukestudio.lib".format(AVALON_CONFIG),
|
||||
"{}.hosts.nukestudio.menu".format(AVALON_CONFIG),
|
||||
"{}.hosts.nukestudio.tags".format(AVALON_CONFIG)
|
||||
"{}.hosts.hiero.lib".format(AVALON_CONFIG),
|
||||
"{}.hosts.hiero.menu".format(AVALON_CONFIG),
|
||||
"{}.hosts.hiero.tags".format(AVALON_CONFIG)
|
||||
):
|
||||
log.info("Reloading module: {}...".format(module))
|
||||
try:
|
||||
|
|
@ -12,7 +12,7 @@ from .lib import (
|
|||
set_workfiles
|
||||
)
|
||||
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
log = Logger().get_logger(__name__, "hiero")
|
||||
|
||||
self = sys.modules[__name__]
|
||||
self._change_context_menu = None
|
||||
|
|
@ -38,7 +38,7 @@ def _update_menu_task_label(*args):
|
|||
|
||||
def install():
|
||||
"""
|
||||
Installing menu into Nukestudio
|
||||
Installing menu into Hiero
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -3,10 +3,12 @@ import os
|
|||
import json
|
||||
import hiero
|
||||
|
||||
from pprint import pformat
|
||||
|
||||
from pype.api import Logger
|
||||
from avalon import io
|
||||
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
log = Logger().get_logger(__name__, "hiero")
|
||||
|
||||
|
||||
def tag_data():
|
||||
|
|
@ -65,21 +67,23 @@ def add_tags_from_presets():
|
|||
|
||||
log.debug("Setting default tags on project: {}".format(project.name()))
|
||||
|
||||
# get nukestudio tags.json
|
||||
# get hiero tags.json
|
||||
nks_pres_tags = tag_data()
|
||||
|
||||
# Get project task types.
|
||||
tasks = io.find_one({"type": "project"})["config"]["tasks"]
|
||||
nks_pres_tags["[Tasks]"] = {}
|
||||
log.debug("__ tasks: {}".format(pformat(tasks)))
|
||||
for task_type in tasks.keys():
|
||||
nks_pres_tags["[Tasks]"][task_type] = {
|
||||
nks_pres_tags["[Tasks]"][task_type.lower()] = {
|
||||
"editable": "1",
|
||||
"note": "",
|
||||
"icon": {
|
||||
"path": "icons:TagGood.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "task"
|
||||
"family": "task",
|
||||
"type": task_type
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4,11 +4,11 @@ from avalon import api
|
|||
from pype.api import Logger
|
||||
|
||||
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
log = Logger().get_logger(__name__, "hiero")
|
||||
|
||||
|
||||
def file_extensions():
|
||||
return api.HOST_WORKFILE_EXTENSIONS["nukestudio"]
|
||||
return api.HOST_WORKFILE_EXTENSIONS["hiero"]
|
||||
|
||||
|
||||
def has_unsaved_changes():
|
||||
|
|
@ -143,15 +143,17 @@ class IntegrateHierarchyToFtrack(pyblish.api.ContextPlugin):
|
|||
# existing_tasks.append(child['type']['name'])
|
||||
|
||||
for task in tasks:
|
||||
if task.lower() in existing_tasks:
|
||||
task_name = next(iter(task))
|
||||
task_type = task[task_name]["type"]
|
||||
if task_name.lower() in existing_tasks:
|
||||
print("Task {} already exists".format(task))
|
||||
continue
|
||||
tasks_to_create.append(task)
|
||||
tasks_to_create.append((task_name, task_type))
|
||||
|
||||
for task in tasks_to_create:
|
||||
for task_name, task_type in tasks_to_create:
|
||||
self.create_task(
|
||||
name=task,
|
||||
task_type=task,
|
||||
name=task_name,
|
||||
task_type=task_type,
|
||||
parent=entity
|
||||
)
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class ExtractBurnin(pype.api.Extractor):
|
|||
"nuke",
|
||||
"maya",
|
||||
"shell",
|
||||
"nukestudio",
|
||||
"hiero",
|
||||
"premiere",
|
||||
"standalonepublisher",
|
||||
"harmony"
|
||||
|
|
|
|||
|
|
@ -100,12 +100,13 @@ class ExtractHierarchyToAvalon(pyblish.api.ContextPlugin):
|
|||
# Do not override data, only update
|
||||
cur_entity_data = entity.get("data") or {}
|
||||
new_tasks = data.pop("tasks", {})
|
||||
if "tasks" in cur_entity_data and new_tasks:
|
||||
for task_name in new_tasks.keys():
|
||||
if task_name \
|
||||
not in cur_entity_data["tasks"].keys():
|
||||
cur_entity_data["tasks"][task_name] = \
|
||||
new_tasks[task_name]
|
||||
if "tasks" not in cur_entity_data and not new_tasks:
|
||||
continue
|
||||
for task in new_tasks:
|
||||
task_name = next(iter(task))
|
||||
if task_name in cur_entity_data["tasks"].keys():
|
||||
continue
|
||||
cur_entity_data["tasks"][task_name] = task[task_name]
|
||||
cur_entity_data.update(data)
|
||||
data = cur_entity_data
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
"nuke",
|
||||
"maya",
|
||||
"shell",
|
||||
"nukestudio",
|
||||
"hiero",
|
||||
"premiere",
|
||||
"harmony",
|
||||
"standalonepublisher",
|
||||
|
|
|
|||
|
|
@ -521,8 +521,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
# get 'files' info for representation and all attached resources
|
||||
self.log.debug("Preparing files information ...")
|
||||
representation["files"] = self.get_files_info(
|
||||
instance,
|
||||
self.integrated_file_sizes)
|
||||
instance,
|
||||
self.integrated_file_sizes)
|
||||
|
||||
self.log.debug("__ representation: {}".format(representation))
|
||||
destination_list.append(dst)
|
||||
|
|
@ -543,10 +543,9 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
repre_ids_to_remove.append(repre["_id"])
|
||||
io.delete_many({"_id": {"$in": repre_ids_to_remove}})
|
||||
|
||||
self.log.debug("__ representations: {}".format(representations))
|
||||
for rep in instance.data["representations"]:
|
||||
self.log.debug("__ represNAME: {}".format(rep['name']))
|
||||
self.log.debug("__ represPATH: {}".format(rep['published_path']))
|
||||
self.log.debug("__ rep: {}".format(rep))
|
||||
|
||||
io.insert_many(representations)
|
||||
instance.data["published_representations"] = (
|
||||
published_representations
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class ValidateFtrackAttributes(pyblish.api.InstancePlugin):
|
|||
"houdini",
|
||||
"maya",
|
||||
"nuke",
|
||||
"nukestudio",
|
||||
"hiero",
|
||||
"photoshop",
|
||||
"premiere",
|
||||
"resolve",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class CollectClipMetadata(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.01
|
||||
label = "Collect Metadata"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, instance):
|
||||
item = instance.data["item"]
|
||||
|
|
@ -10,7 +10,7 @@ class CollectClipTimecodes(pyblish.api.InstancePlugin):
|
|||
|
||||
order = pyblish.api.CollectorOrder + 0.101
|
||||
label = "Collect Timecodes"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ class ExtractPlateCheck(api.ContextPlugin):
|
|||
|
||||
order = api.ExtractorOrder + 0.01
|
||||
label = "Plates Export Waiting"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["encode"]
|
||||
|
||||
def process(self, context):
|
||||
|
|
@ -6,7 +6,7 @@ class ExtractTasks(api.InstancePlugin):
|
|||
|
||||
order = api.ExtractorOrder
|
||||
label = "Tasks"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["clip"]
|
||||
optional = True
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ class ValidateProjectRoot(api.ContextPlugin):
|
|||
|
||||
order = api.ValidatorOrder
|
||||
label = "Project Root"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
actions = [RepairProjectRoot]
|
||||
|
||||
def process(self, context):
|
||||
|
|
@ -5,7 +5,7 @@ class ValidateResolvedPaths(api.ContextPlugin):
|
|||
|
||||
order = api.ValidatorOrder
|
||||
label = "Resolved Paths"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, context):
|
||||
import os
|
||||
|
|
@ -13,7 +13,7 @@ class ValidateOutputRange(api.InstancePlugin):
|
|||
order = api.ValidatorOrder
|
||||
families = ["trackItem.task"]
|
||||
label = "Output Range"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
optional = True
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -43,7 +43,7 @@ class ValidateImageSequence(api.InstancePlugin):
|
|||
families = ["trackItem.task", "img"]
|
||||
match = api.Subset
|
||||
label = "Image Sequence"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
optional = True
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -10,7 +10,7 @@ class ValidateClip(api.InstancePlugin):
|
|||
families = ["clip"]
|
||||
# match = api.Exact
|
||||
label = "Validate Track Item"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
optional = True
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -2,11 +2,11 @@ from pyblish import api
|
|||
|
||||
|
||||
class ValidateViewerLut(api.ContextPlugin):
|
||||
"""Validate viewer lut in NukeStudio is the same as in Nuke."""
|
||||
"""Validate viewer lut in Hiero is the same as in Nuke."""
|
||||
|
||||
order = api.ValidatorOrder
|
||||
label = "Viewer LUT"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
optional = True
|
||||
|
||||
def process(self, context):
|
||||
|
|
@ -14,8 +14,8 @@ class ValidateViewerLut(api.ContextPlugin):
|
|||
import hiero
|
||||
|
||||
# nuke_lut = nuke.ViewerProcess.node()["current"].value()
|
||||
nukestudio_lut = context.data["activeProject"].lutSettingViewer()
|
||||
self.log.info("__ nukestudio_lut: {}".format(nukestudio_lut))
|
||||
hiero_lut = context.data["activeProject"].lutSettingViewer()
|
||||
self.log.info("__ hiero_lut: {}".format(hiero_lut))
|
||||
|
||||
msg = "Viewer LUT can only be RGB"
|
||||
assert "RGB" in nukestudio_lut, msg
|
||||
assert "RGB" in hiero_lut, msg
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from avalon import api
|
||||
import hiero
|
||||
from pype.hosts.nukestudio import lib
|
||||
from pype.hosts.hiero import lib
|
||||
reload(lib)
|
||||
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ class CollectAssetBuilds(api.ContextPlugin):
|
|||
# Run just after CollectClip
|
||||
order = api.CollectorOrder + 0.02
|
||||
label = "Collect AssetBuilds"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, context):
|
||||
asset_builds = {}
|
||||
|
|
@ -14,7 +14,7 @@ class CollectAudio(api.InstancePlugin):
|
|||
# Run just before CollectSubsets
|
||||
order = api.CollectorOrder + 0.1021
|
||||
label = "Collect Audio"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["clip"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -8,7 +8,7 @@ class CollectCalculateRetime(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.02
|
||||
label = "Collect Calculate Retiming"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['retime']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipResolution(pyblish.api.InstancePlugin):
|
|||
|
||||
order = pyblish.api.CollectorOrder + 0.101
|
||||
label = "Collect Clip Resoluton"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, instance):
|
||||
sequence = instance.context.data['activeSequence']
|
||||
|
|
@ -9,7 +9,7 @@ class CollectClips(api.ContextPlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.01
|
||||
label = "Collect Clips"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, context):
|
||||
# create asset_names conversion table
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipFrameRanges(pyblish.api.InstancePlugin):
|
|||
|
||||
order = pyblish.api.CollectorOrder + 0.101
|
||||
label = "Collect Frame Ranges"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ class CollectFramerate(api.ContextPlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.01
|
||||
label = "Collect Framerate"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, context):
|
||||
sequence = context.data["activeSequence"]
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipHandles(api.ContextPlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.0121
|
||||
label = "Collect Handles"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, context):
|
||||
assets_shared = context.data.get("assetsShared")
|
||||
|
|
@ -13,7 +13,7 @@ class CollectHierarchyInstance(pyblish.api.ContextPlugin):
|
|||
"""
|
||||
|
||||
label = "Collect Hierarchy Clip"
|
||||
order = pyblish.api.CollectorOrder + 0.101
|
||||
order = pyblish.api.CollectorOrder + 0.102
|
||||
families = ["clip"]
|
||||
|
||||
def convert_to_entity(self, key, value):
|
||||
|
|
@ -46,7 +46,7 @@ class CollectHierarchyInstance(pyblish.api.ContextPlugin):
|
|||
clip_out = instance.data["clipOut"]
|
||||
fps = context.data["fps"]
|
||||
|
||||
# build data for inner nukestudio project property
|
||||
# build data for inner hiero project property
|
||||
data = {
|
||||
"sequence": (
|
||||
context.data['activeSequence'].name().replace(' ', '_')
|
||||
|
|
@ -6,7 +6,7 @@ class CollectLeaderClip(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.0111
|
||||
label = "Collect Leader Clip"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -16,7 +16,7 @@ class CollectPlates(api.InstancePlugin):
|
|||
# Run just before CollectSubsets
|
||||
order = api.CollectorOrder + 0.1021
|
||||
label = "Collect Plates"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["clip"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -85,7 +85,7 @@ class CollectPlatesData(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.48
|
||||
label = "Collect Plates Data"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["plate"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -192,16 +192,17 @@ class CollectPlatesData(api.InstancePlugin):
|
|||
instance.data["representations"].append(
|
||||
plates_mov_representation)
|
||||
|
||||
thumb_file = head + ".png"
|
||||
thumb_frame = instance.data["clipInH"] + (
|
||||
(instance.data["clipOutH"] - instance.data["clipInH"]) / 2)
|
||||
thumb_file = "{}_{}{}".format(head, thumb_frame, ".png")
|
||||
thumb_path = os.path.join(staging_dir, thumb_file)
|
||||
thumb_frame = instance.data["sourceIn"] + ((instance.data["sourceOut"] - instance.data["sourceIn"])/2)
|
||||
|
||||
thumbnail = item.thumbnail(thumb_frame).save(
|
||||
thumb_path,
|
||||
format='png'
|
||||
)
|
||||
self.log.debug("__ sourceIn: `{}`".format(instance.data["sourceIn"]))
|
||||
self.log.debug("__ thumbnail: `{}`, frame: `{}`".format(thumbnail, thumb_frame))
|
||||
self.log.debug("__ thumbnail: `{}`, frame: `{}`".format(
|
||||
thumbnail, thumb_frame))
|
||||
|
||||
thumb_representation = {
|
||||
'files': thumb_file,
|
||||
|
|
@ -5,7 +5,7 @@ class CollectClipSubsets(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.103
|
||||
label = "Collect Remove Clip Instaces"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -15,7 +15,7 @@ class CollectReviews(api.InstancePlugin):
|
|||
# Run just before CollectSubsets
|
||||
order = api.CollectorOrder + 0.1022
|
||||
label = "Collect Reviews"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["plate"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -142,12 +142,12 @@ class CollectReviews(api.InstancePlugin):
|
|||
staging_dir = os.path.dirname(
|
||||
source_path)
|
||||
|
||||
thumb_file = head + ".png"
|
||||
thumb_frame = instance.data["clipInH"] + (
|
||||
(instance.data["clipOutH"] - instance.data["clipInH"]) / 2)
|
||||
thumb_file = "{}_{}{}".format(head, thumb_frame, ".png")
|
||||
thumb_path = os.path.join(staging_dir, thumb_file)
|
||||
self.log.debug("__ thumb_path: {}".format(thumb_path))
|
||||
|
||||
thumb_frame = instance.data["sourceIn"] + (
|
||||
(instance.data["sourceOut"] - instance.data["sourceIn"]) / 2)
|
||||
self.log.debug("__ thumb_frame: {}".format(thumb_frame))
|
||||
thumbnail = item.thumbnail(thumb_frame).save(
|
||||
thumb_path,
|
||||
|
|
@ -7,7 +7,7 @@ class CollectSequence(api.ContextPlugin):
|
|||
|
||||
order = api.CollectorOrder - 0.01
|
||||
label = "Collect Sequence"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, context):
|
||||
context.data['activeSequence'] = hiero.ui.activeSequence()
|
||||
|
|
@ -7,7 +7,7 @@ class CollectShots(api.InstancePlugin):
|
|||
# Run just before CollectClipSubsets
|
||||
order = api.CollectorOrder + 0.1021
|
||||
label = "Collect Shots"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["clip"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -43,7 +43,7 @@ class CollectShots(api.InstancePlugin):
|
|||
"{} - {} - tasks:{} - assetbuilds:{} - comments:{}".format(
|
||||
data["asset"],
|
||||
data["subset"],
|
||||
data["tasks"].keys(),
|
||||
[task.keys()[0] for task in data["tasks"]],
|
||||
[x["name"] for x in data.get("assetbuilds", [])],
|
||||
len(data.get("comments", []))
|
||||
)
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipTagComments(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.013
|
||||
label = "Collect Comments"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["clip"]
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipTagFrameStart(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.013
|
||||
label = "Collect Frame Start"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -7,7 +7,7 @@ class CollectClipTagHandles(api.ContextPlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.012
|
||||
label = "Collect Tag Handles"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, context):
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipTagResolution(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.013
|
||||
label = "Collect Source Resolution"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -6,7 +6,7 @@ class CollectTagRetime(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.014
|
||||
label = "Collect Retiming Tag"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipSubsetsTags(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.012
|
||||
label = "Collect Tags Subsets"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipTagTasks(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.012
|
||||
label = "Collect Tag Tasks"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -20,8 +20,9 @@ class CollectClipTagTasks(api.InstancePlugin):
|
|||
|
||||
# gets only task family tags and collect labels
|
||||
if "task" in t_family:
|
||||
t_task = t_metadata.get("tag.label", "")
|
||||
tasks.append(t_task)
|
||||
t_task_name = t_metadata.get("tag.label", "")
|
||||
t_task_type = t_metadata.get("tag.type", "")
|
||||
tasks.append({t_task_name: {"type": t_task_type}})
|
||||
|
||||
instance.data["tasks"] = tasks
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ class CollectClipTags(api.InstancePlugin):
|
|||
|
||||
order = api.CollectorOrder + 0.011
|
||||
label = "Collect Tags"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ['clip']
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -7,7 +7,7 @@ class ExtractAudioFile(pype.api.Extractor):
|
|||
|
||||
order = api.ExtractorOrder
|
||||
label = "Extract Subset Audio"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["clip", "audio"]
|
||||
match = api.Intersection
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ class ExtractReviewCutUpVideo(pype.api.Extractor):
|
|||
order = api.ExtractorOrder
|
||||
# order = api.CollectorOrder + 0.1023
|
||||
label = "Extract Review CutUp Video"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
families = ["review"]
|
||||
|
||||
# presets
|
||||
|
|
@ -227,7 +227,7 @@ class ExtractReviewCutUpVideo(pype.api.Extractor):
|
|||
"step": 1,
|
||||
"fps": fps,
|
||||
"name": "cut_up_preview",
|
||||
"tags": ["review", "delete"] + self.tags_addition,
|
||||
"tags": ["review"] + self.tags_addition,
|
||||
"ext": ext,
|
||||
"anatomy_template": "publish"
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ class ValidateHierarchy(api.InstancePlugin):
|
|||
order = api.ValidatorOrder
|
||||
families = ["clip", "shot"]
|
||||
label = "Validate Hierarchy"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, instance):
|
||||
asset_name = instance.data.get("asset", None)
|
||||
|
|
@ -13,7 +13,7 @@ class ValidateNames(api.InstancePlugin):
|
|||
families = ["clip"]
|
||||
match = api.Exact
|
||||
label = "Names"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ class VersionUpWorkfile(api.ContextPlugin):
|
|||
|
||||
order = api.IntegratorOrder + 10.1
|
||||
label = "Version-up Workfile"
|
||||
hosts = ["nukestudio"]
|
||||
hosts = ["hiero"]
|
||||
|
||||
optional = True
|
||||
active = True
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
19
setup/hiero/hiero_plugin_path/Python/Startup/Startup.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import traceback
|
||||
|
||||
# activate hiero from pype
|
||||
import avalon.api
|
||||
import pype.hosts.hiero
|
||||
avalon.api.install(pype.hosts.hiero)
|
||||
|
||||
try:
|
||||
__import__("pype.hosts.hiero")
|
||||
__import__("pyblish")
|
||||
|
||||
except ImportError as e:
|
||||
print(traceback.format_exc())
|
||||
print("pyblish: Could not load integration: %s " % e)
|
||||
|
||||
else:
|
||||
# Setup integration
|
||||
import pype.hosts.hiero.lib
|
||||
pype.hosts.hiero.lib.setup()
|
||||