Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

611 Simplify Hiero tag workflow #648

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
9fd3ca5
feat(hiero): moving code from resolve
jakubjezek001 Oct 6, 2020
0a295ef
Merge branch 'feature/616-convert-nukestudio-to-hiero-host' into feat…
jakubjezek001 Oct 7, 2020
bcd6b4d
Merge branch 'feature/616-convert-nukestudio-to-hiero-host' into feat…
jakubjezek001 Oct 8, 2020
08e1522
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Oct 13, 2020
9902024
feat(hiero): refactoring host modules
jakubjezek001 Oct 13, 2020
6092b00
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Oct 15, 2020
10e870c
feat(hiero): wip
jakubjezek001 Oct 15, 2020
897ca9b
feat(hiero): refactoring tags.py and removing tags.json
jakubjezek001 Oct 16, 2020
a11221f
style(hiero): line
jakubjezek001 Oct 16, 2020
f48a4f4
fix(hiero): duplicating root Bin bin objects
jakubjezek001 Oct 16, 2020
c86c442
feat(hiero): refactoring hiero host modules wip
jakubjezek001 Oct 16, 2020
f432d85
clean(hiero): clean up old code
jakubjezek001 Oct 16, 2020
9fa2463
feat(hiero): adding basic functionality
jakubjezek001 Oct 16, 2020
de72cea
feat(hiero): creator plugin wip
jakubjezek001 Oct 19, 2020
4af511f
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Oct 20, 2020
03814cb
feat(hiero): wip create shot clips
jakubjezek001 Oct 20, 2020
bef4b2e
feat(hiero): improving ui layout
jakubjezek001 Oct 20, 2020
b8b5afb
feat(hiero): ui fixes and order
jakubjezek001 Oct 20, 2020
caa6f93
feat(hiero): wip create_publish_clip
jakubjezek001 Oct 20, 2020
48eb561
feat(hiero): solving track layer to subsetName
jakubjezek001 Oct 20, 2020
9060f70
clean(hiero): pep8 fixes
jakubjezek001 Oct 21, 2020
03a13de
feat(hiero): wip publishing clips
jakubjezek001 Oct 21, 2020
793437d
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Oct 23, 2020
4f27917
feat(hiero): adding subsets to ui
jakubjezek001 Oct 23, 2020
96d1ed8
feat(hiero): wip create and publish clips
jakubjezek001 Oct 26, 2020
3350ecc
feat(hiero): finishing pype publish tag from creator plugin
jakubjezek001 Oct 26, 2020
77a3891
clean(hiero): prints
jakubjezek001 Oct 26, 2020
e662e64
clean(hiero): make readable dict
jakubjezek001 Oct 27, 2020
987292a
fix(hiero): hound and PR comments
jakubjezek001 Oct 27, 2020
f0993b5
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Oct 27, 2020
f943587
feat(hiero): PR suggestions
jakubjezek001 Oct 27, 2020
a69c694
feat(hiero): PR suggestions
jakubjezek001 Oct 27, 2020
7e05706
Merge remote-tracking branch 'origin/feature/611-simplify-hiero-tag-w…
jakubjezek001 Oct 27, 2020
f3aed25
doc(hiero): adding some docstrings
jakubjezek001 Oct 27, 2020
13d5d2d
feat(hiero): publishing clips and workfile WIP
jakubjezek001 Oct 27, 2020
36cbd06
feat(hiero): refactoring function related code to object based
jakubjezek001 Oct 27, 2020
777b331
feat(hiero): adding parents to publish tag data
jakubjezek001 Oct 28, 2020
1c400aa
feat(hiero): speeding up hierarchy with simplification
jakubjezek001 Oct 29, 2020
b74a3f4
feat(global): removing `clip` family
jakubjezek001 Oct 29, 2020
42b8e41
feat(hiero): publishing tasks
jakubjezek001 Oct 29, 2020
7d3d1d3
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Oct 29, 2020
e2b5e97
hound(hiero): updates
jakubjezek001 Oct 29, 2020
2c5cfca
feat(hiero): move plugin related code from lib.py to plugin.py
jakubjezek001 Oct 30, 2020
a1f030e
feat(hiero): loader loading done, update wip
jakubjezek001 Oct 30, 2020
053ba70
feat(hiero): loading, updating, removing Clip to timeline
jakubjezek001 Nov 3, 2020
ab4400a
clean(hiero): remove prints
jakubjezek001 Nov 3, 2020
d0b6a3a
clean(hiero): cleaning prints and menu
jakubjezek001 Nov 3, 2020
4dd4b87
feat(hiero): reverse default behaviour of `get_track_items`
jakubjezek001 Nov 3, 2020
97c184f
hound(hiero): removing reload
jakubjezek001 Nov 3, 2020
da3dab7
feat(hiero): multiselection from loader and loader plugin options
jakubjezek001 Nov 3, 2020
4483e61
fix(hiero): plugin qt imports
jakubjezek001 Nov 3, 2020
bedaf8c
fix(hiero): removing third party plugin (too many pep8 problems)
jakubjezek001 Nov 3, 2020
c7bb14a
fix(hiero): name of attribute
jakubjezek001 Nov 10, 2020
080cea5
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Nov 12, 2020
7c416c1
fix(hiero): fix after develop merge
jakubjezek001 Nov 12, 2020
5a924fd
fix(hiero): renaming sequence was broken
jakubjezek001 Nov 12, 2020
b7482b4
Merge branch '2.x/develop' into feature/611-simplify-hiero-tag-workflow
jakubjezek001 Nov 17, 2020
f735fb1
feat(hiero): collecting subtrack items
jakubjezek001 Nov 13, 2020
fad7117
feat(hiero): apply colorspace from presets
jakubjezek001 Nov 17, 2020
7ea1eca
hound(hiero): suggestions
jakubjezek001 Nov 17, 2020
7667e47
feat(hiero): collecting subtrack items
jakubjezek001 Nov 13, 2020
b5b62f8
feat(hiero): apply colorspace from presets
jakubjezek001 Nov 17, 2020
f043633
hound(hiero): suggestions
jakubjezek001 Nov 17, 2020
2c2e434
feat(global): rework family filtering for hiero editorial
jakubjezek001 Nov 17, 2020
fb6619f
feat(hiero): adding review collection and processing
jakubjezek001 Nov 17, 2020
cabbc53
hound(hiero): suggestions
jakubjezek001 Nov 17, 2020
103918c
feat(hiero, nuke): collect effects and load plugins
jakubjezek001 Nov 18, 2020
2dacfac
fix(hiero): change order
jakubjezek001 Nov 18, 2020
d4ca6f9
fix(hiero): assetbuild tag
jakubjezek001 Nov 18, 2020
3a703f7
hound(nuke): suggestions
jakubjezek001 Nov 18, 2020
712e465
tweak default values
mkolar Nov 19, 2020
b53ed9f
feat(hiero): review is defined by track name in creator
jakubjezek001 Nov 19, 2020
79cfcd2
hound(hiero): removing reload
jakubjezek001 Nov 20, 2020
4f715bb
feat(hiero): collect, validate, extract audio
jakubjezek001 Nov 20, 2020
f5df7d5
feat(hiero): moving collect review class functions to hiero.lib
jakubjezek001 Nov 20, 2020
1a3d1f9
feat(hiero): creator plugin distribution audio option to tags
jakubjezek001 Nov 20, 2020
6f22a24
Merge branch 'feature/611-simplify-hiero-tag-workflow' into feature/h…
jakubjezek001 Nov 20, 2020
41cc39c
fix(hiero): missing id in tag
jakubjezek001 Nov 20, 2020
c145494
Merge branch 'feature/hiero-publishing-review' into feature/hiero-pub…
jakubjezek001 Nov 20, 2020
7b72a5d
fix(hiero): if no review track selected error was raising
jakubjezek001 Nov 20, 2020
a85438e
fix(hiero): order of plugins
jakubjezek001 Nov 20, 2020
be0402e
Merge branch 'feature/hiero-publishing-review' into feature/hiero-pub…
jakubjezek001 Nov 20, 2020
e6792d7
feat(hiero): improving overlapping detector
jakubjezek001 Nov 20, 2020
557e8db
typo(heiro): spell error in name of function
jakubjezek001 Nov 20, 2020
8f6e3b1
Merge branch 'feature/hiero-publishing-review' into feature/hiero-app…
jakubjezek001 Nov 20, 2020
966f4cf
Merge pull request #720 from pypeclub/feature/hiero-publishing-review
mkolar Nov 20, 2020
6d44ee0
Merge pull request #739 from pypeclub/feature/hiero-apply-colorspace-…
mkolar Nov 20, 2020
daefe52
Merge branch 'feature/611-simplify-hiero-tag-workflow' into feature/h…
jakubjezek001 Nov 23, 2020
705ef4d
Merge branch 'feature/611-simplify-hiero-tag-workflow' into feature/h…
jakubjezek001 Nov 23, 2020
ee866c4
fix(hiero): review sequence and plate representation
jakubjezek001 Nov 24, 2020
02986c6
fix(hiero): plugin order and inherited padding
jakubjezek001 Nov 24, 2020
61193d9
Merge pull request #727 from pypeclub/feature/hiero-publishing-effects
mkolar Dec 1, 2020
1690cba
Merge pull request #743 from pypeclub/bugfix/hiero-review-sequence-nu…
mkolar Dec 1, 2020
796a049
Merge branch 'feature/611-simplify-hiero-tag-workflow' into feature/h…
mkolar Jan 14, 2021
3c1514c
Merge pull request #737 from pypeclub/feature/hiero-publish-audio
mkolar Jan 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 78 additions & 100 deletions pype/hosts/hiero/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import os
from pype.api import Logger
from avalon import api as avalon
from pyblish import api as pyblish
from pype import PLUGINS_DIR

from .workio import (
open_file,
save_file,
Expand All @@ -13,109 +7,93 @@
work_root
)

from .menu import (
install as menu_install,
_update_menu_task_label
from .pipeline import (
launch_workfiles_app,
ls,
install,
uninstall,
reload_config,
containerise,
publish,
maintained_selection,
parse_container,
update_container,
reset_selection
)

from .lib import (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.lib.get_sequence_pattern_and_padding' imported but unused
'.lib.is_overlapping' imported but unused

get_track_items,
get_current_project,
get_current_sequence,
get_current_track,
get_track_item_pype_tag,
set_track_item_pype_tag,
get_track_item_pype_data,
set_publish_attribute,
get_publish_attribute,
imprint,
get_selected_track_items,
set_selected_track_items,
create_nuke_workfile_clips,
create_bin,
apply_colorspace_project,
apply_colorspace_clips,
is_overlapping,
get_sequence_pattern_and_padding
)

from .events import register_hiero_events
from .plugin import (
CreatorWidget,
Creator,
PublishClip,
SequenceLoader,
ClipLoader
)

__all__ = [
# avalon pipeline module
"launch_workfiles_app",
"ls",
"install",
"uninstall",
"reload_config",
"containerise",
"publish",
"maintained_selection",
"parse_container",
"update_container",
"reset_selection",

# Workfiles API
"open_file",
"save_file",
"current_file",
"has_unsaved_changes",
"file_extensions",
"work_root",
]

# get logger
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, "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):
pyblish.register_gui(os.getenv("PYBLISH_GUI", None))


def install():
"""
Installing Hiero integration for avalon

Args:
config (obj): avalon config module `pype` in our case, it is not
used but required by avalon.api.install()

"""

# adding all events
_register_events()

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)
avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH)

# Disable all families except for the ones we explicitly want to see
family_states = [
"write",
"review",
"plate"
]

avalon.data["familiesStateDefault"] = False
avalon.data["familiesStateToggled"] = family_states

# install menu
menu_install()

# register hiero events
register_hiero_events()


def uninstall():
"""
Uninstalling Hiero integration for avalon

"""
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)


def _register_events():
"""
Adding all callbacks.
"""

# if task changed then change notext of hiero
avalon.on("taskChanged", _update_menu_task_label)
log.info("Installed event callback for 'taskChanged'..")


def ls():
"""List available containers.

This function is used by the Container Manager in Nuke. You'll
need to implement a for-loop that then *yields* one Container at
a time.

See the `container.json` schema for details on how it should look,
and the Maya equivalent, which is in `avalon.maya.pipeline`
"""
# TODO: listing all availabe containers form sequence
return
# Lib functions
"get_track_items",
"get_current_project",
"get_current_sequence",
"get_current_track",
"get_track_item_pype_tag",
"set_track_item_pype_tag",
"get_track_item_pype_data",
"set_publish_attribute",
"get_publish_attribute",
"imprint",
"get_selected_track_items",
"set_selected_track_items",
"create_nuke_workfile_clips",
"create_bin",
"apply_colorspace_project",
"apply_colorspace_clips",

# plugins
"CreatorWidget",
"Creator",
"PublishClip",
"SequenceLoader",
"ClipLoader"
]
20 changes: 16 additions & 4 deletions pype/hosts/hiero/events.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import hiero.core.events
import avalon.api as avalon
from pype.api import Logger
from .lib import sync_avalon_data_to_workfile, launch_workfiles_app
from .tags import add_tags_from_presets
from .tags import add_tags_to_workfile
from .menu import update_menu_task_label

log = Logger().get_logger(__name__, "hiero")

Expand All @@ -28,7 +30,7 @@ def afterNewProjectCreated(event):
sync_avalon_data_to_workfile()

# add tags from preset
add_tags_from_presets()
add_tags_to_workfile()

# Workfiles.
if int(os.environ.get("WORKFILES_STARTUP", "0")):
Expand All @@ -48,7 +50,7 @@ def afterProjectLoad(event):
sync_avalon_data_to_workfile()

# add tags from preset
add_tags_from_presets()
add_tags_to_workfile()


def beforeProjectClosed(event):
Expand Down Expand Up @@ -77,7 +79,7 @@ def register_hiero_events():
"kAfterNewProjectCreated, kBeforeProjectLoad, kAfterProjectLoad, "
"kBeforeProjectSave, kAfterProjectSave, kBeforeProjectClose, "
"kAfterProjectClose, kShutdown, kStartup"
)
)

# hiero.core.events.registerInterest(
# "kBeforeNewProjectCreated", beforeNewProjectCreated)
Expand Down Expand Up @@ -105,3 +107,13 @@ def register_hiero_events():
# workfiles
hiero.core.events.registerEventType("kStartWorkfiles")
hiero.core.events.registerInterest("kStartWorkfiles", launch_workfiles_app)


def register_events():
"""
Adding all callbacks.
"""

# if task changed then change notext of hiero
avalon.on("taskChanged", update_menu_task_label)
log.info("Installed event callback for 'taskChanged'..")
Loading