mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
initial commit for anatomy widget
This commit is contained in:
parent
ce6e64e573
commit
dabe68f28c
3 changed files with 70 additions and 1 deletions
|
|
@ -3,6 +3,10 @@
|
|||
"type": "dict-invisible",
|
||||
"children": [
|
||||
{
|
||||
"type": "anatomy",
|
||||
"key": "anatomy",
|
||||
"is_file": true
|
||||
}, {
|
||||
"type": "schema",
|
||||
"children": [
|
||||
"1_plugins_gui_schema"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
from .window import MainWidget
|
||||
# TODO properly register inputs to TypeToKlass class
|
||||
from . import inputs
|
||||
from . import anatomy_inputs
|
||||
|
||||
__all__ = [
|
||||
"MainWidget",
|
||||
"inputs"
|
||||
"inputs",
|
||||
"anatomy_inputs"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
import json
|
||||
import logging
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
from .widgets import (
|
||||
ExpandingWidget,
|
||||
ModifiedIntSpinBox,
|
||||
ModifiedFloatSpinBox
|
||||
)
|
||||
from .inputs import ConfigObject, InputObject
|
||||
from .lib import NOT_SET, AS_WIDGET, METADATA_KEY, TypeToKlass
|
||||
|
||||
|
||||
class AnatomyWidget(QtWidgets.QWidget, InputObject):
|
||||
value_changed = QtCore.Signal(object)
|
||||
|
||||
def __init__(
|
||||
self, input_data, values, parent_keys, parent, label_widget=None
|
||||
):
|
||||
self._parent = parent
|
||||
self._as_widget = values is AS_WIDGET
|
||||
|
||||
self._is_group = True
|
||||
self._state = None
|
||||
|
||||
self.key = "anatomy"
|
||||
self.start_value = None
|
||||
|
||||
super(AnatomyWidget, self).__init__(parent)
|
||||
|
||||
layout = QtWidgets.QHBoxLayout(self)
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
layout.setSpacing(5)
|
||||
label = QtWidgets.QLabel("Test")
|
||||
layout.addWidget(label)
|
||||
|
||||
self.override_value = NOT_SET
|
||||
|
||||
def update_global_values(self, values):
|
||||
print("* update_global_values")
|
||||
|
||||
def set_value(self, value, *, global_value=False):
|
||||
print("* set_value")
|
||||
|
||||
def clear_value(self):
|
||||
print("* clear_value")
|
||||
|
||||
def _on_value_change(self, item=None):
|
||||
print("* _on_value_change")
|
||||
|
||||
def update_style(self):
|
||||
print("* update_style")
|
||||
|
||||
def item_value(self):
|
||||
print("* item_value")
|
||||
|
||||
|
||||
class TemplatesWidget:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
TypeToKlass.types["anatomy"] = AnatomyWidget
|
||||
Loading…
Add table
Add a link
Reference in a new issue