mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
adding parent to publisher only if nuke higher then 14
This commit is contained in:
parent
fbb6afe5c3
commit
b3cab6a88b
3 changed files with 23 additions and 4 deletions
|
|
@ -43,7 +43,8 @@ from .lib import (
|
|||
get_node_data,
|
||||
set_node_data,
|
||||
update_node_data,
|
||||
create_write_node
|
||||
create_write_node,
|
||||
get_app_version_info
|
||||
)
|
||||
from .utils import (
|
||||
colorspace_exists_on_node,
|
||||
|
|
@ -90,6 +91,7 @@ __all__ = (
|
|||
"set_node_data",
|
||||
"update_node_data",
|
||||
"create_write_node",
|
||||
"get_app_version_info",
|
||||
|
||||
"colorspace_exists_on_node",
|
||||
"get_colorspace_list"
|
||||
|
|
|
|||
|
|
@ -3116,3 +3116,14 @@ def get_viewer_config_from_string(input_string):
|
|||
).format(input_string))
|
||||
|
||||
return (display, viewer)
|
||||
|
||||
|
||||
def get_app_version_info():
|
||||
""" Return dict of Nuke's version semantic info"""
|
||||
dot_split = nuke.NUKE_VERSION_STRING.split(".")
|
||||
v_spit = dot_split[1].split("v")
|
||||
return {
|
||||
"major": int(dot_split[0]),
|
||||
"minor": int(v_spit[0]),
|
||||
"patch": int(v_spit[1])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ from .lib import (
|
|||
add_scripts_menu,
|
||||
add_scripts_gizmo,
|
||||
get_node_data,
|
||||
set_node_data
|
||||
set_node_data,
|
||||
get_app_version_info
|
||||
)
|
||||
from .workfile_template_builder import (
|
||||
NukePlaceholderLoadPlugin,
|
||||
|
|
@ -218,6 +219,7 @@ def _install_menu():
|
|||
main_window = get_main_window()
|
||||
menubar = nuke.menu("Nuke")
|
||||
menu = menubar.addMenu(MENU_LABEL)
|
||||
app_version = get_app_version_info()
|
||||
|
||||
if not ASSIST:
|
||||
label = "{0}, {1}".format(
|
||||
|
|
@ -237,17 +239,21 @@ def _install_menu():
|
|||
|
||||
menu.addSeparator()
|
||||
if not ASSIST:
|
||||
# only add parent if nuke version is 14 or higher
|
||||
# known issue with no solution yet
|
||||
menu.addCommand(
|
||||
"Create...",
|
||||
lambda: host_tools.show_publisher(
|
||||
parent=main_window,
|
||||
parent=main_window if app_version["major"] >= 14 else None,
|
||||
tab="create"
|
||||
)
|
||||
)
|
||||
# only add parent if nuke version is 14 or higher
|
||||
# known issue with no solution yet
|
||||
menu.addCommand(
|
||||
"Publish...",
|
||||
lambda: host_tools.show_publisher(
|
||||
parent=main_window,
|
||||
parent=main_window if app_version["major"] >= 14 else None,
|
||||
tab="publish"
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue