We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In your user folder's init.py:
init.py
import nuke nuke.pluginAddPath(r'Z:\ImageClassifier') # NUKE_PLUGIN_PATH=Z:\ImageClassifier
menu.py:
menu.py
from image_classifier.menu import create_menu create_menu()
image_classifier.menu:
image_classifier.menu
from __future__ import annotations from PySide2 import QtWidgets, QtCore import nuke import image_classifier def create_menu() -> None: main_menu = nuke.menu('Nuke') if menu := main_menu.menu(image_classifier.__name__): menu.clearMenu() else: menu = main_menu.addMenu(image_classifier.__name__) menu.addCommand('Open ...', open_widget) def open_widget() -> None: widget = QtWidgets.QWidget() parent = get_main_window() widget.setParent(parent, QtCore.Qt.Tool) widget.show() def get_main_window() -> QtWidgets.QWidget | None: for widget in QtWidgets.QApplication.topLevelWidgets(): if widget.metaObject().className() == 'Foundry::UI::DockMainWindow': return widget
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In your user folder's
init.py
:menu.py
:image_classifier.menu
:The text was updated successfully, but these errors were encountered: