Skip to content

Add a setting to suppress the minimum supported Nuke version Dialog#124

Open
RicardoMusch wants to merge 4 commits into
shotgunsoftware:masterfrom
NodesLayers:master
Open

Add a setting to suppress the minimum supported Nuke version Dialog#124
RicardoMusch wants to merge 4 commits into
shotgunsoftware:masterfrom
NodesLayers:master

Conversation

@RicardoMusch

Copy link
Copy Markdown
Contributor

Add a setting to suppress the minimum supported Nuke version Dialog.
This is required for usage in a Studio pipeline where we are aware of the "danger" of running into issues but should be able to suppress these dialogs for our users.

Reasons:

  • Minimum supported is not minimum required version so we can still use the engine but can expect bugs.
  • It will become very annoying for users if Nuke blocks every time they load a new instance, something a comper might do a hundred times a day.
  • This gives Pipeline TD's the ability to turn off the GUI Warning (it still logs the warning)

RicardoMusch and others added 3 commits October 8, 2025 00:29
…s it blocks the startup of Nuke and makes this annoying in daily use.
…n the script. This is better than getting the context from the path as the path usually doesn't include the Task name/id.
@codecov

codecov Bot commented Nov 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.00%. Comparing base (4b58294) to head (de49e0d).

Files with missing lines Patch % Lines
engine.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
- Coverage   20.03%   20.00%   -0.04%     
==========================================
  Files           6        6              
  Lines         549      550       +1     
==========================================
  Hits          110      110              
- Misses        439      440       +1     
Flag Coverage Δ
Linux 18.90% <0.00%> (-0.04%) ⬇️
Python-3.10 20.00% <0.00%> (-0.04%) ⬇️
Python-3.11 20.00% <0.00%> (-0.04%) ⬇️
Python-3.13 20.00% <0.00%> (-0.04%) ⬇️
Python-3.9 20.00% <0.00%> (-0.04%) ⬇️
Windows 18.90% <0.00%> (-0.04%) ⬇️
macOS 18.00% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings June 12, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR persists the current ShotGrid/Toolkit context into a Nuke root knob on save and attempts to restore it on load, while also making the minimum-supported-version warning dialog configurable.

Changes:

  • Store serialized Toolkit context into a root.sgtk_context knob on script save and deserialize it on script load.
  • Add helper to ensure the sgtk tab + sgtk_context knob exist on the root node.
  • Add a new engine setting to optionally suppress the “minimum supported Nuke version” GUI warning dialog.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
python/tk_nuke/init.py Add knob/tab creation + context serialization on save, and knob-based context restoration on load.
info.yml Add configuration to enable/disable the minimum supported version warning dialog.
engine.py Gate the minimum supported version warning dialog behind the new setting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +263 to +276
logger.debug("Trying to get the context from the root.sgtk_context knob if it exists...")
# Try to get the context from the root.sgtk_context knob if it exists
root = nuke.root()
if "sgtk_context" in root.knobs():
context_knob = root.knob("sgtk_context")
context_str_serialized = context_knob.value()
if context_str_serialized:
logger.debug("Found serialized context in knob: %s" % context_str_serialized)
try:
new_ctx = sgtk.Context.deserialize(context_str_serialized)
logger.debug("Deserialized context from knob: %r" % (new_ctx,))
# Now switch to the context appropriate for the file
__engine_refresh(new_ctx)
return
Comment on lines +166 to +168
context_str = new_ctx.serialize(with_user_credentials=False, use_json=False)
context_knob.setValue(context_str)
logger.debug("Updated 'sgtk_context' knob with value: %s" % context_str)
Comment on lines +270 to +273
logger.debug("Found serialized context in knob: %s" % context_str_serialized)
try:
new_ctx = sgtk.Context.deserialize(context_str_serialized)
logger.debug("Deserialized context from knob: %r" % (new_ctx,))
Comment on lines +202 to +203
except Exception as e:
logger.exception("Failed to ensure 'sgtk' tab and 'sgtk_context' knob: %s", e)
Comment thread engine.py
Comment on lines +254 to +261
"""
Flow Production Tracking no longer supports {product} versions older than
{version}.
You can continue to use Toolkit but you may experience bugs or instabilities.

For information regarding support engine versions, please visit this page:
{url_doc_supported_versions}
""".strip()
Comment thread info.yml
display_min_supported_version_warning_dialog:
type: bool
description: "Controls whether a warning should display if the nuke version is below the minimum supported,
but above the minimum required, version. Defaults to True. Set to False to disable the GUI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants