ayon-core/openpype/tools/publisher/constants.py
Jakub Trllo d0f083ec19
Publisher: Explicit save (#4676)
* added save button class

* added save button to window

* workfiles is also part of context in CreateContext to be able check if context changed

* window cares about trigger of convertors

* use abstractproperty with property and abstractmethod decorators

* save changes happens using main window and can be blocked

* fix pyside compatibility

* use create context to get current context names

* Fix docstring label

* added shortcuts for save and reset

* change control string matching for macos

* added 'publish_has_started' property

* allow save only if publishing did not start yet

* rename 'get_selected_convertors' to 'get_selected_legacy_convertors' and added docstrings

* Added Saved changes

* disable instances toggle when publishing started

* Fix reset button tooltip

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>

* Use QKeySequence to string for tooltips

* added example output

* use predefined method to emit card message

---------

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
2023-03-23 12:52:25 +01:00

47 lines
1.3 KiB
Python

from qtpy import QtCore, QtGui
# ID of context item in instance view
CONTEXT_ID = "context"
CONTEXT_LABEL = "Options"
# 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 (\"_\")."
)
# 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",
)