Merge branch 'develop' of https://github.com/pypeclub/OpenPype into maya_rig_validate_cycle_errors

 Conflicts:
	openpype/settings/defaults/project_settings/maya.json
	openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json
This commit is contained in:
Roy Nieterau 2022-01-25 15:01:43 +01:00
commit 4bf2d2a750
436 changed files with 21142 additions and 2787 deletions

View file

@ -57,7 +57,7 @@ from .exceptions import (
SchemaError,
DefaultsNotDefined,
StudioDefaultsNotDefined,
BaseInvalidValueType,
BaseInvalidValue,
InvalidValueType,
InvalidKeySymbols,
SchemaMissingFileInfo,
@ -106,7 +106,7 @@ from .enum_entity import (
ToolsEnumEntity,
TaskTypeEnumEntity,
DeadlineUrlEnumEntity,
AnatomyTemplatesEnumEntity
AnatomyTemplatesEnumEntity,
)
from .list_entity import ListEntity
@ -122,12 +122,15 @@ from .dict_conditional import (
)
from .anatomy_entities import AnatomyEntity
from .op_version_entity import (
ProductionVersionsInputEntity,
StagingVersionsInputEntity
)
__all__ = (
"DefaultsNotDefined",
"StudioDefaultsNotDefined",
"BaseInvalidValueType",
"BaseInvalidValue",
"InvalidValueType",
"InvalidKeySymbols",
"SchemaMissingFileInfo",
@ -181,5 +184,8 @@ __all__ = (
"DictConditionalEntity",
"SyncServerProviders",
"AnatomyEntity"
"AnatomyEntity",
"ProductionVersionsInputEntity",
"StagingVersionsInputEntity"
)

View file

@ -9,7 +9,7 @@ from .lib import (
)
from .exceptions import (
BaseInvalidValueType,
BaseInvalidValue,
InvalidValueType,
SchemeGroupHierarchyBug,
EntitySchemaError
@ -437,7 +437,7 @@ class BaseItemEntity(BaseEntity):
try:
new_value = self.convert_to_valid_type(value)
except BaseInvalidValueType:
except BaseInvalidValue:
new_value = NOT_SET
if new_value is not NOT_SET:

View file

@ -1,7 +1,7 @@
from .lib import STRING_TYPE
from .input_entities import InputEntity
from .exceptions import (
BaseInvalidValueType,
BaseInvalidValue,
InvalidValueType
)
@ -47,7 +47,7 @@ class ColorEntity(InputEntity):
reason = "Color entity expect 4 items in list got {}".format(
len(value)
)
raise BaseInvalidValueType(reason, self.path)
raise BaseInvalidValue(reason, self.path)
new_value = []
for item in value:
@ -60,7 +60,7 @@ class ColorEntity(InputEntity):
reason = (
"Color entity expect 4 integers in range 0-255 got {}"
).format(value)
raise BaseInvalidValueType(reason, self.path)
raise BaseInvalidValue(reason, self.path)
new_value.append(item)
# Make sure

View file

@ -15,14 +15,14 @@ class StudioDefaultsNotDefined(Exception):
super(StudioDefaultsNotDefined, self).__init__(msg)
class BaseInvalidValueType(Exception):
class BaseInvalidValue(Exception):
def __init__(self, reason, path):
msg = "Path \"{}\". {}".format(path, reason)
self.msg = msg
super(BaseInvalidValueType, self).__init__(msg)
super(BaseInvalidValue, self).__init__(msg)
class InvalidValueType(BaseInvalidValueType):
class InvalidValueType(BaseInvalidValue):
def __init__(self, valid_types, invalid_type, path):
joined_types = ", ".join(
[str(valid_type) for valid_type in valid_types]

View file

@ -441,6 +441,16 @@ class TextEntity(InputEntity):
# GUI attributes
self.multiline = self.schema_data.get("multiline", False)
self.placeholder_text = self.schema_data.get("placeholder")
self.value_hints = self.schema_data.get("value_hints") or []
def schema_validations(self):
if self.multiline and self.value_hints:
reason = (
"TextEntity entity can't use value hints"
" for multiline input (yet)."
)
raise EntitySchemaError(self, reason)
super(TextEntity, self).schema_validations()
def _convert_to_valid_type(self, value):
# Allow numbers converted to string
@ -459,6 +469,17 @@ class PathInput(InputEntity):
# GUI attributes
self.placeholder_text = self.schema_data.get("placeholder")
def set(self, value):
# Strip value
super(PathInput, self).set(value.strip())
def set_override_state(self, state, ignore_missing_defaults):
super(PathInput, self).set_override_state(
state, ignore_missing_defaults
)
# Strip current value
self._current_value = self._current_value.strip()
class RawJsonEntity(InputEntity):
schema_types = ["raw-json"]

View file

@ -0,0 +1,89 @@
from openpype.lib.openpype_version import (
get_remote_versions,
get_OpenPypeVersion,
get_installed_version
)
from .input_entities import TextEntity
from .lib import (
OverrideState,
NOT_SET
)
from .exceptions import BaseInvalidValue
class OpenPypeVersionInput(TextEntity):
"""Entity to store OpenPype version to use.
Settings created on another machine may affect available versions
on current user's machine. Text input element is provided to explicitly
set version not yet showing up the user's machine.
It is possible to enter empty string. In that case is used any latest
version. Any other string must match regex of OpenPype version semantic.
"""
def _item_initialization(self):
super(OpenPypeVersionInput, self)._item_initialization()
self.multiline = False
self.placeholder_text = "Latest"
self.value_hints = []
def _get_openpype_versions(self):
"""This is abstract method returning version hints for UI purposes."""
raise NotImplementedError((
"{} does not have implemented '_get_openpype_versions'"
).format(self.__class__.__name__))
def set_override_state(self, state, *args, **kwargs):
"""Update value hints for UI purposes."""
value_hints = []
if state is OverrideState.STUDIO:
versions = self._get_openpype_versions()
for version in versions:
version_str = str(version)
if version_str not in value_hints:
value_hints.append(version_str)
self.value_hints = value_hints
super(OpenPypeVersionInput, self).set_override_state(
state, *args, **kwargs
)
def convert_to_valid_type(self, value):
"""Add validation of version regex."""
if value and value is not NOT_SET:
OpenPypeVersion = get_OpenPypeVersion()
if OpenPypeVersion is not None:
try:
OpenPypeVersion(version=value)
except Exception:
raise BaseInvalidValue(
"Value \"{}\"is not valid version format.".format(
value
),
self.path
)
return super(OpenPypeVersionInput, self).convert_to_valid_type(value)
class ProductionVersionsInputEntity(OpenPypeVersionInput):
"""Entity meant only for global settings to define production version."""
schema_types = ["production-versions-text"]
def _get_openpype_versions(self):
versions = get_remote_versions(staging=False, production=True)
if versions is None:
return []
versions.append(get_installed_version())
return sorted(versions)
class StagingVersionsInputEntity(OpenPypeVersionInput):
"""Entity meant only for global settings to define staging version."""
schema_types = ["staging-versions-text"]
def _get_openpype_versions(self):
versions = get_remote_versions(staging=True, production=False)
if versions is None:
return []
return sorted(versions)

View file

@ -110,6 +110,10 @@
"type": "schema",
"name": "schema_project_celaction"
},
{
"type": "schema",
"name": "schema_project_flame"
},
{
"type": "schema",
"name": "schema_project_resolve"

View file

@ -0,0 +1,194 @@
{
"type": "dict",
"collapsible": true,
"key": "flame",
"label": "Flame",
"is_file": true,
"children": [
{
"type": "dict",
"collapsible": true,
"key": "create",
"label": "Create plugins",
"children": [
{
"type": "dict",
"collapsible": true,
"key": "CreateShotClip",
"label": "Create Shot Clip",
"is_group": true,
"children": [
{
"type": "collapsible-wrap",
"label": "Shot Hierarchy And Rename Settings",
"collapsible": false,
"children": [
{
"type": "text",
"key": "hierarchy",
"label": "Shot parent hierarchy"
},
{
"type": "boolean",
"key": "clipRename",
"label": "Rename clips"
},
{
"type": "text",
"key": "clipName",
"label": "Clip name template"
},
{
"type": "boolean",
"key": "segmentIndex",
"label": "Accept segment order"
},
{
"type": "number",
"key": "countFrom",
"label": "Count sequence from"
},
{
"type": "number",
"key": "countSteps",
"label": "Stepping number"
}
]
},
{
"type": "collapsible-wrap",
"label": "Shot Template Keywords",
"collapsible": false,
"children": [
{
"type": "text",
"key": "folder",
"label": "{folder}"
},
{
"type": "text",
"key": "episode",
"label": "{episode}"
},
{
"type": "text",
"key": "sequence",
"label": "{sequence}"
},
{
"type": "text",
"key": "track",
"label": "{track}"
},
{
"type": "text",
"key": "shot",
"label": "{shot}"
}
]
},
{
"type": "collapsible-wrap",
"label": "Vertical Synchronization Of Attributes",
"collapsible": false,
"children": [
{
"type": "boolean",
"key": "vSyncOn",
"label": "Enable Vertical Sync"
}
]
},
{
"type": "collapsible-wrap",
"label": "Shot Attributes",
"collapsible": false,
"children": [
{
"type": "number",
"key": "workfileFrameStart",
"label": "Workfiles Start Frame"
},
{
"type": "number",
"key": "handleStart",
"label": "Handle start (head)"
},
{
"type": "number",
"key": "handleEnd",
"label": "Handle end (tail)"
}
]
}
]
}
]
},
{
"type": "dict",
"collapsible": true,
"key": "publish",
"label": "Publish plugins",
"children": [
{
"type": "dict",
"collapsible": true,
"key": "ExtractSubsetResources",
"label": "Extract Subset Resources",
"is_group": true,
"children": [
{
"type": "boolean",
"key": "keep_original_representation",
"label": "Publish clip's original media"
},
{
"key": "export_presets_mapping",
"label": "Export presets mapping",
"type": "dict-modifiable",
"highlight_content": true,
"object_type": {
"type": "dict",
"children": [
{
"key": "ext",
"label": "Output extension",
"type": "text"
},
{
"key": "xml_preset_file",
"label": "XML preset file (with ext)",
"type": "text"
},
{
"key": "xml_preset_dir",
"label": "XML preset folder (optional)",
"type": "text"
},
{
"type": "separator"
},
{
"type": "boolean",
"key": "representation_add_range",
"label": "Add frame range to representation"
},
{
"type": "list",
"key": "representation_tags",
"label": "Add representation tags",
"object_type": {
"type": "text",
"multiline": false
}
}
]
}
}
]
}
]
}
]
}

View file

@ -91,6 +91,11 @@
"key": "upload_thumbnail",
"label": "Upload thumbnail"
},
{
"type": "boolean",
"key": "upload_review",
"label": "Upload review"
},
{
"type": "text",
"multiline": true,

View file

@ -143,6 +143,28 @@
"label": "Delivery",
"object_type": "text"
},
{
"type": "dict",
"key": "unreal",
"label": "Unreal",
"children": [
{
"type": "text",
"key": "folder",
"label": "Folder"
},
{
"type": "text",
"key": "file",
"label": "File"
},
{
"type": "text",
"key": "path",
"label": "Path"
}
]
},
{
"type": "dict-modifiable",
"key": "others",

View file

@ -267,7 +267,9 @@
"label": "Task types"
},
{
"type": "splitter"
"type": "boolean",
"key": "is_include",
"label": "Exclude / Include"
},
{
"type": "template",

View file

@ -66,6 +66,38 @@
}
]
},
{
"type": "dict",
"collapsible": true,
"key": "CreateUnrealStaticMesh",
"label": "Create Unreal - Static Mesh",
"checkbox_key": "enabled",
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "list",
"key": "defaults",
"label": "Default Subsets",
"object_type": "text"
},
{
"type": "text",
"key": "static_mesh_prefix",
"label": "Static Mesh Prefix"
},
{
"type": "list",
"key": "collision_prefixes",
"label": "Collision Mesh Prefixes",
"object_type": "text"
}
]
},
{
"type": "schema_template",
"name": "template_create_plugin",
@ -118,10 +150,6 @@
"key": "CreateSetDress",
"label": "Create Set Dress"
},
{
"key": "CreateUnrealStaticMesh",
"label": "Create Unreal - Static Mesh"
},
{
"key": "CreateVrayProxy",
"label": "Create VRay Proxy"

View file

@ -72,6 +72,17 @@
]
},
{
"type": "schema_template",
"name": "template_publish_plugin",
"template_data": [
{
"key": "ValidateShadingEngine",
"label": "Validate Look Shading Engine Naming"
}
]
},
{
"type": "dict",
"collapsible": true,
@ -118,6 +129,31 @@
]
},
{
"type": "dict",
"collapsible": true,
"key": "ValidateUnrealStaticMeshName",
"label": "Validate Unreal Static Mesh Name",
"checkbox_key": "enabled",
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "boolean",
"key": "validate_mesh",
"label": "Validate mesh Names "
},
{
"type": "boolean",
"key": "validate_collision",
"label": "Validate collision names"
}
]
},
{
"type": "dict",
"collapsible": true,

View file

@ -10,23 +10,39 @@
"multiselection": "{multiselection}",
"type": "enum",
"enum_items": [
{"action": "action"},
{"animation": "animation"},
{"audio": "audio"},
{"camera": "camera"},
{"editorial": "editorial"},
{"layout": "layout"},
{"look": "look"},
{"mayaAscii": "mayaAscii"},
{"model": "model"},
{"pointcache": "pointcache"},
{"reference": "reference"},
{"render": "render"},
{"review": "review"},
{"rig": "rig"},
{"setdress": "setdress"},
{"workfile": "workfile"},
{"xgen": "xgen"}
{"action": "action"},
{"animation": "animation"},
{"assembly": "assembly"},
{"audio": "audio"},
{"backgroundComp": "backgroundComp"},
{"backgroundLayout": "backgroundLayout"},
{"camera": "camera"},
{"editorial": "editorial"},
{"gizmo": "gizmo"},
{"image": "image"},
{"layout": "layout"},
{"look": "look"},
{"matchmove": "matchmove"},
{"mayaScene": "mayaScene"},
{"model": "model"},
{"nukenodes": "nukenodes"},
{"plate": "plate"},
{"pointcache": "pointcache"},
{"prerender": "prerender"},
{"redshiftproxy": "redshiftproxy"},
{"reference": "reference"},
{"render": "render"},
{"review": "review"},
{"rig": "rig"},
{"setdress": "setdress"},
{"take": "take"},
{"usdShade": "usdShade"},
{"vdbcache": "vdbcache"},
{"vrayproxy": "vrayproxy"},
{"workfile": "workfile"},
{"xgen": "xgen"},
{"yetiRig": "yetiRig"},
{"yeticache": "yeticache"}
]
}
]

View file

@ -21,19 +21,23 @@
},
{
"type": "label",
"label": "Additional Ftrack paths"
"label": "Additional Ftrack event handlers paths"
},
{
"type": "list",
"type": "path",
"key": "ftrack_actions_path",
"label": "Action paths",
"object_type": "text"
"label": "User paths",
"use_label_wrap": true,
"multipath": true,
"multiplatform": true
},
{
"type": "list",
"type": "path",
"key": "ftrack_events_path",
"label": "Event paths",
"object_type": "text"
"label": "Server paths",
"use_label_wrap": true,
"multipath": true,
"multiplatform": true
},
{
"type": "separator"

View file

@ -20,7 +20,7 @@
},
{
"type": "label",
"label": "This is <b>NOT a securely stored password!</b>. It only acts as a simple barrier to stop users from accessing studio wide settings."
"label": "This is <b>NOT a securely stored password!</b> It only acts as a simple barrier to stop users from accessing studio wide settings."
},
{
"type": "text",
@ -111,12 +111,49 @@
"type": "splitter"
},
{
"type": "path",
"key": "openpype_path",
"label": "Versions Repository",
"multiplatform": true,
"multipath": true,
"require_restart": true
"type": "collapsible-wrap",
"label": "OpenPype deployment control",
"collapsible": false,
"children": [
{
"type": "path",
"key": "openpype_path",
"label": "Versions Repository",
"multiplatform": true,
"multipath": true,
"require_restart": true
},
{
"type": "splitter"
},
{
"type": "label",
"label": "Define explicit OpenPype version that should be used. Keep empty to use latest available version."
},
{
"type": "production-versions-text",
"key": "production_version",
"label": "Production version"
},
{
"type": "staging-versions-text",
"key": "staging_version",
"label": "Staging version"
},
{
"type": "splitter"
},
{
"type": "label",
"label": "Trigger validation if running OpenPype is using studio defined version each 'n' <b>minutes</b>. Validation happens in OpenPype tray application."
},
{
"type": "number",
"key": "version_check_interval",
"label": "Version check interval",
"minimum": 0
}
]
}
]
}