mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
24 lines
691 B
Python
24 lines
691 B
Python
# -*- coding: utf-8 -*-
|
|
"""OpenPype script commands to be used directly in Maya."""
|
|
import sys
|
|
|
|
|
|
def edit_shader_definitions():
|
|
from avalon.tools import lib
|
|
from Qt import QtWidgets
|
|
from openpype.hosts.maya.api.shader_definition_editor import (
|
|
ShaderDefinitionsEditor
|
|
)
|
|
|
|
module = sys.modules[__name__]
|
|
module.window = None
|
|
|
|
top_level_widgets = QtWidgets.QApplication.topLevelWidgets()
|
|
main_window = next(widget for widget in top_level_widgets
|
|
if widget.objectName() == "MayaWindow")
|
|
|
|
with lib.application():
|
|
window = ShaderDefinitionsEditor(parent=main_window)
|
|
window.show()
|
|
|
|
module.window = window
|