mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
add scripts to utils
This commit is contained in:
parent
3a1665a8aa
commit
c414c8c6e9
3 changed files with 11 additions and 11 deletions
|
|
@ -2,7 +2,6 @@ import logging
|
|||
import contextlib
|
||||
import nuke
|
||||
|
||||
from qtpy import QtWidgets
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -21,11 +20,3 @@ def viewer_update_and_undo_stop():
|
|||
yield
|
||||
finally:
|
||||
nuke.Undo.enable()
|
||||
|
||||
|
||||
def is_headless():
|
||||
"""
|
||||
Returns:
|
||||
bool: headless
|
||||
"""
|
||||
return QtWidgets.QApplication.instance() is None
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import os
|
|||
import nuke
|
||||
|
||||
from openpype import resources
|
||||
from .lib import maintained_selection
|
||||
from qtpy import QtWidgets
|
||||
|
||||
|
||||
def set_context_favorites(favorites=None):
|
||||
|
|
@ -55,6 +55,7 @@ def bake_gizmos_recursively(in_group=None):
|
|||
Arguments:
|
||||
is_group (nuke.Node)[optonal]: group node or all nodes
|
||||
"""
|
||||
from .lib import maintained_selection
|
||||
if in_group is None:
|
||||
in_group = nuke.Root()
|
||||
# preserve selection after all is done
|
||||
|
|
@ -129,3 +130,11 @@ def get_colorspace_list(colorspace_knob):
|
|||
reduced_clrs.append(clrs)
|
||||
|
||||
return reduced_clrs
|
||||
|
||||
|
||||
def is_headless():
|
||||
"""
|
||||
Returns:
|
||||
bool: headless
|
||||
"""
|
||||
return QtWidgets.QApplication.instance() is None
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"""Host API required Work Files tool"""
|
||||
import os
|
||||
import nuke
|
||||
from .command import is_headless
|
||||
from .utils import is_headless
|
||||
|
||||
|
||||
def file_extensions():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue