ayon-core/openpype/tools/publisher/constants.py
Jakub Trllo 38347ece5a
Publisher: Small style changes (#4894)
* border hover has color without alpha

* changed border radius to 0.2em

* removed border from scroll area

* variant hint button has 0.5em width

* inputs in attribute definitions have smaller padding

* label is shown only to value inputs and added tooltips

* change spacing for attribute befinitions

* align labels to right

* implemented 'ComboBox' which ignores wheel events and has styled delegate

* PixmalLabel has minimum sizeHint

* cards are smaller

* renamed 'Options' to 'Context'

* implemented active state changes in card view

* set object name of main window to "PublishWindow"

* plugin don't have to pass 'title' to an error

* fix PySide6 support for custom keysequences

* check for exact match for all bindings

* added validation of exact match for save shortcut
2023-04-25 10:37:49 +02:00

50 lines
1.3 KiB
Python

from qtpy import QtCore, QtGui
# ID of context item in instance view
CONTEXT_ID = "context"
CONTEXT_LABEL = "Context"
# Not showed anywhere - used as identifier
CONTEXT_GROUP = "__ContextGroup__"
CONVERTOR_ITEM_GROUP = "Incompatible subsets"
# Allowed symbols for subset name (and variant)
# - characters, numbers, unsercore and dash
VARIANT_TOOLTIP = (
"Variant may contain alphabetical characters (a-Z)"
"\nnumerical characters (0-9) dot (\".\") or underscore (\"_\")."
)
INPUTS_LAYOUT_HSPACING = 4
INPUTS_LAYOUT_VSPACING = 2
# Roles for instance views
INSTANCE_ID_ROLE = QtCore.Qt.UserRole + 1
SORT_VALUE_ROLE = QtCore.Qt.UserRole + 2
IS_GROUP_ROLE = QtCore.Qt.UserRole + 3
CREATOR_IDENTIFIER_ROLE = QtCore.Qt.UserRole + 4
CREATOR_THUMBNAIL_ENABLED_ROLE = QtCore.Qt.UserRole + 5
FAMILY_ROLE = QtCore.Qt.UserRole + 6
GROUP_ROLE = QtCore.Qt.UserRole + 7
CONVERTER_IDENTIFIER_ROLE = QtCore.Qt.UserRole + 8
CREATOR_SORT_ROLE = QtCore.Qt.UserRole + 9
ResetKeySequence = QtGui.QKeySequence(
QtCore.Qt.ControlModifier | QtCore.Qt.Key_R
)
__all__ = (
"CONTEXT_ID",
"VARIANT_TOOLTIP",
"INSTANCE_ID_ROLE",
"SORT_VALUE_ROLE",
"IS_GROUP_ROLE",
"CREATOR_IDENTIFIER_ROLE",
"CREATOR_THUMBNAIL_ENABLED_ROLE",
"CREATOR_SORT_ROLE",
"FAMILY_ROLE",
"GROUP_ROLE",
"CONVERTER_IDENTIFIER_ROLE",
)