moving Assist switch to api level

condition for updating nodes
This commit is contained in:
Jakub Jezek 2023-02-21 15:26:07 +01:00 committed by Jakub Ježek
parent 71745e185c
commit f3431c6279
3 changed files with 19 additions and 11 deletions

View file

@ -1,3 +1,4 @@
import os
from .workio import (
file_extensions,
has_unsaved_changes,
@ -50,6 +51,8 @@ from .utils import (
get_colorspace_list
)
ASSIST = bool(os.getenv("NUKEASSIST"))
__all__ = (
"file_extensions",
"has_unsaved_changes",
@ -92,5 +95,7 @@ __all__ = (
"create_write_node",
"colorspace_exists_on_node",
"get_colorspace_list"
"get_colorspace_list",
"ASSIST"
)

View file

@ -49,7 +49,7 @@ from openpype.pipeline.colorspace import (
)
from openpype.pipeline.workfile import BuildWorkfile
from . import gizmo_menu
from . import gizmo_menu, ASSIST
from .workio import (
save_file,
@ -2263,14 +2263,17 @@ class WorkfileSettings(object):
node['frame_range'].setValue(range)
node['frame_range_lock'].setValue(True)
set_node_data(
self._root_node,
INSTANCE_DATA_KNOB,
{
"handleStart": int(handle_start),
"handleEnd": int(handle_end)
}
)
if not ASSIST:
set_node_data(
self._root_node,
INSTANCE_DATA_KNOB,
{
"handleStart": int(handle_start),
"handleEnd": int(handle_end)
}
)
else:
log.warning("NukeAssist mode is not allowing updating custom knobs...")
def reset_resolution(self):
"""Set resolution to project resolution."""

View file

@ -60,6 +60,7 @@ from .workio import (
work_root,
current_file
)
from . import ASSIST
log = Logger.get_logger(__name__)
@ -71,7 +72,6 @@ CREATE_PATH = os.path.join(PLUGINS_DIR, "create")
INVENTORY_PATH = os.path.join(PLUGINS_DIR, "inventory")
MENU_LABEL = os.environ["AVALON_LABEL"]
ASSIST = bool(os.getenv("NUKEASSIST"))
# registering pyblish gui regarding settings in presets
if os.getenv("PYBLISH_GUI", None):