mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
reimplemented pype's workfiles tool in nuke
This commit is contained in:
parent
5d0ef4f89f
commit
d81625cf71
2 changed files with 23 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import sys
|
|||
import nuke
|
||||
|
||||
from avalon import api as avalon
|
||||
from avalon.tools import workfiles
|
||||
from pype.tools import workfiles
|
||||
from pyblish import api as pyblish
|
||||
from pype.api import Logger
|
||||
import pype.hosts.nuke
|
||||
|
|
|
|||
|
|
@ -1,15 +1,37 @@
|
|||
import os
|
||||
import nuke
|
||||
from avalon.api import Session
|
||||
|
||||
from .lib import WorkfileSettings
|
||||
from pype.api import Logger, BuildWorkfile, get_current_project_settings
|
||||
from pype.tools import workfiles
|
||||
|
||||
log = Logger().get_logger(__name__)
|
||||
|
||||
|
||||
def _show_workfiles(*args, **kwargs):
|
||||
workfiles.show(os.environ["AVALON_WORKDIR"])
|
||||
|
||||
|
||||
def install():
|
||||
menubar = nuke.menu("Nuke")
|
||||
menu = menubar.findItem(Session["AVALON_LABEL"])
|
||||
|
||||
# replace reset resolution from avalon core to pype's
|
||||
name = "Work Files..."
|
||||
rm_item = [
|
||||
(i, item) for i, item in enumerate(menu.items()) if name in item.name()
|
||||
][0]
|
||||
|
||||
log.debug("Changing Item: {}".format(rm_item))
|
||||
|
||||
menu.removeItem(rm_item[1].name())
|
||||
menu.addCommand(
|
||||
name,
|
||||
_show_workfiles,
|
||||
index=(rm_item[0])
|
||||
)
|
||||
|
||||
# replace reset resolution from avalon core to pype's
|
||||
name = "Reset Resolution"
|
||||
new_name = "Set Resolution"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue