diff --git a/openpype/pipeline/create/__init__.py b/openpype/pipeline/create/__init__.py index 610ef6d8e2..948b719851 100644 --- a/openpype/pipeline/create/__init__.py +++ b/openpype/pipeline/create/__init__.py @@ -1,3 +1,6 @@ +from .constants import ( + SUBSET_NAME_ALLOWED_SYMBOLS +) from .creator_plugins import ( CreatorError, @@ -13,6 +16,8 @@ from .context import ( __all__ = ( + "SUBSET_NAME_ALLOWED_SYMBOLS", + "CreatorError", "BaseCreator", diff --git a/openpype/pipeline/create/constants.py b/openpype/pipeline/create/constants.py new file mode 100644 index 0000000000..bfbbccfd12 --- /dev/null +++ b/openpype/pipeline/create/constants.py @@ -0,0 +1,6 @@ +SUBSET_NAME_ALLOWED_SYMBOLS = "a-zA-Z0-9_." + + +__all__ = ( + "SUBSET_NAME_ALLOWED_SYMBOLS", +) diff --git a/openpype/tools/publisher/constants.py b/openpype/tools/publisher/constants.py index cf0850bde8..dc44aade45 100644 --- a/openpype/tools/publisher/constants.py +++ b/openpype/tools/publisher/constants.py @@ -6,7 +6,6 @@ CONTEXT_LABEL = "Options" # Allowed symbols for subset name (and variant) # - characters, numbers, unsercore and dash -SUBSET_NAME_ALLOWED_SYMBOLS = "a-zA-Z0-9_." VARIANT_TOOLTIP = ( "Variant may contain alphabetical characters (a-Z)" "\nnumerical characters (0-9) dot (\".\") or underscore (\"_\")." @@ -23,7 +22,6 @@ FAMILY_ROLE = QtCore.Qt.UserRole + 5 __all__ = ( "CONTEXT_ID", - "SUBSET_NAME_ALLOWED_SYMBOLS", "VARIANT_TOOLTIP", "INSTANCE_ID_ROLE", diff --git a/openpype/tools/publisher/widgets/create_dialog.py b/openpype/tools/publisher/widgets/create_dialog.py index 0206f038fb..84fc6d4e97 100644 --- a/openpype/tools/publisher/widgets/create_dialog.py +++ b/openpype/tools/publisher/widgets/create_dialog.py @@ -9,11 +9,13 @@ except Exception: commonmark = None from Qt import QtWidgets, QtCore, QtGui -from openpype.pipeline.create import CreatorError +from openpype.pipeline.create import ( + CreatorError, + SUBSET_NAME_ALLOWED_SYMBOLS +) from .widgets import IconValuePixmapLabel from ..constants import ( - SUBSET_NAME_ALLOWED_SYMBOLS, VARIANT_TOOLTIP, CREATOR_IDENTIFIER_ROLE, FAMILY_ROLE diff --git a/openpype/tools/publisher/widgets/widgets.py b/openpype/tools/publisher/widgets/widgets.py index 606985c058..fe00ee78d3 100644 --- a/openpype/tools/publisher/widgets/widgets.py +++ b/openpype/tools/publisher/widgets/widgets.py @@ -9,7 +9,7 @@ from avalon.vendor import qtawesome from openpype.widgets.attribute_defs import create_widget_for_attr_def from openpype.tools.flickcharm import FlickCharm - +from openpype.pipeline.create import SUBSET_NAME_ALLOWED_SYMBOLS from .models import ( AssetsHierarchyModel, TasksModel, @@ -21,7 +21,6 @@ from .icons import ( ) from ..constants import ( - SUBSET_NAME_ALLOWED_SYMBOLS, VARIANT_TOOLTIP )