mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge branch 'develop' into chore/maya_remove_publish_gui_filters
# Conflicts: # server_addon/nuke/server/version.py
This commit is contained in:
commit
c1fbc2b6fb
718 changed files with 44887 additions and 8479 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -115,9 +115,7 @@ class ToolGroupModel(BaseSettingsModel):
|
|||
name: str = Field("", title="Name")
|
||||
label: str = Field("", title="Label")
|
||||
environment: str = Field("{}", title="Environments", widget="textarea")
|
||||
variants: list[ToolVariantModel] = Field(
|
||||
default_factory=ToolVariantModel
|
||||
)
|
||||
variants: list[ToolVariantModel] = Field(default_factory=list)
|
||||
|
||||
@validator("environment")
|
||||
def validate_json(cls, value):
|
||||
|
|
@ -166,8 +164,12 @@ class ApplicationsSettings(BaseSettingsModel):
|
|||
default_factory=AppGroupWithPython, title="Adobe After Effects")
|
||||
celaction: AppGroup = Field(
|
||||
default_factory=AppGroupWithPython, title="Celaction 2D")
|
||||
substancepainter: AppGroup = Field(
|
||||
default_factory=AppGroupWithPython, title="Substance Painter")
|
||||
unreal: AppGroup = Field(
|
||||
default_factory=AppGroupWithPython, title="Unreal Editor")
|
||||
wrap: AppGroup = Field(
|
||||
default_factory=AppGroupWithPython, title="Wrap")
|
||||
additional_apps: list[AdditionalAppGroup] = Field(
|
||||
default_factory=list, title="Additional Applications")
|
||||
|
||||
|
|
@ -197,5 +199,5 @@ class ApplicationsAddonSettings(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_VALUES = {
|
||||
"only_available": False
|
||||
"only_available": True
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.1"
|
||||
__version__ = "0.1.3"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class BlenderSettings(BaseSettingsModel):
|
|||
default_factory=BlenderImageIOModel,
|
||||
title="Color Management (ImageIO)"
|
||||
)
|
||||
render_settings: RenderSettingsModel = Field(
|
||||
RenderSettings: RenderSettingsModel = Field(
|
||||
default_factory=RenderSettingsModel, title="Render Settings")
|
||||
workfile_builder: TemplateWorkfileBaseOptions = Field(
|
||||
default_factory=TemplateWorkfileBaseOptions,
|
||||
|
|
@ -57,11 +57,11 @@ DEFAULT_VALUES = {
|
|||
"unit_scale_settings": {
|
||||
"enabled": True,
|
||||
"apply_on_opening": False,
|
||||
"base_file_unit_scale": 0.01
|
||||
"base_file_unit_scale": 1.00
|
||||
},
|
||||
"set_frames_startup": True,
|
||||
"set_resolution_startup": True,
|
||||
"render_settings": DEFAULT_RENDER_SETTINGS,
|
||||
"RenderSettings": DEFAULT_RENDER_SETTINGS,
|
||||
"publish": DEFAULT_BLENDER_PUBLISH_SETTINGS,
|
||||
"workfile_builder": {
|
||||
"create_first_version": False,
|
||||
|
|
|
|||
|
|
@ -61,26 +61,20 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
ValidateCameraZeroKeyframe: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Camera Zero Keyframe",
|
||||
section="Validators"
|
||||
section="General Validators"
|
||||
)
|
||||
ValidateFileSaved: ValidateFileSavedModel = Field(
|
||||
default_factory=ValidateFileSavedModel,
|
||||
title="Validate File Saved",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateRenderCameraIsSet: ValidatePluginModel = Field(
|
||||
ValidateInstanceEmpty: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Camera Is Set",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateDeadlinePublish: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Output for Deadline",
|
||||
section="Validators"
|
||||
title="Validate Instance is not Empty"
|
||||
)
|
||||
ValidateMeshHasUvs: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Mesh Has Uvs"
|
||||
title="Validate Mesh Has Uvs",
|
||||
section="Model Validators"
|
||||
)
|
||||
ValidateMeshNoNegativeScale: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
|
|
@ -94,6 +88,15 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
default_factory=ValidatePluginModel,
|
||||
title="Validate No Colons In Name"
|
||||
)
|
||||
ValidateRenderCameraIsSet: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Camera Is Set",
|
||||
section="Render Validators"
|
||||
)
|
||||
ValidateDeadlinePublish: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Output for Deadline",
|
||||
)
|
||||
ExtractBlend: ExtractBlendModel = Field(
|
||||
default_factory=ExtractBlendModel,
|
||||
title="Extract Blend",
|
||||
|
|
@ -103,7 +106,7 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
default_factory=ValidatePluginModel,
|
||||
title="Extract FBX"
|
||||
)
|
||||
ExtractABC: ValidatePluginModel = Field(
|
||||
ExtractModelABC: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract ABC"
|
||||
)
|
||||
|
|
@ -125,7 +128,7 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
)
|
||||
ExtractLayout: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract Layout"
|
||||
title="Extract Layout (JSON)"
|
||||
)
|
||||
ExtractThumbnail: ExtractPlayblastModel = Field(
|
||||
default_factory=ExtractPlayblastModel,
|
||||
|
|
@ -139,7 +142,7 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
|
||||
DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
||||
"ValidateCameraZeroKeyframe": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
|
|
@ -170,11 +173,16 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
|||
"active": True
|
||||
},
|
||||
"ValidateTransformZero": {
|
||||
"enabled": True,
|
||||
"optional": False,
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateNoColonsInName": {
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateInstanceEmpty": {
|
||||
"enabled": True,
|
||||
"optional": False,
|
||||
"active": True
|
||||
|
|
@ -193,14 +201,14 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
|||
]
|
||||
},
|
||||
"ExtractFBX": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": False
|
||||
"active": True
|
||||
},
|
||||
"ExtractABC": {
|
||||
"ExtractModelABC": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": False
|
||||
"active": True
|
||||
},
|
||||
"ExtractBlendAnimation": {
|
||||
"enabled": True,
|
||||
|
|
@ -208,9 +216,9 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
|||
"active": True
|
||||
},
|
||||
"ExtractAnimationFBX": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": False
|
||||
"active": True
|
||||
},
|
||||
"ExtractCamera": {
|
||||
"enabled": True,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.3"
|
||||
__version__ = "0.1.5"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,27 @@ from .publish_plugins import PublishPuginsModel, DEFAULT_PUBLISH_VALUES
|
|||
from .tools import GlobalToolsModel, DEFAULT_TOOLS_VALUES
|
||||
|
||||
|
||||
class DiskMappingItemModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
source: str = Field("", title="Source")
|
||||
destination: str = Field("", title="Destination")
|
||||
|
||||
|
||||
class DiskMappingModel(BaseSettingsModel):
|
||||
windows: list[DiskMappingItemModel] = Field(
|
||||
title="Windows",
|
||||
default_factory=list,
|
||||
)
|
||||
linux: list[DiskMappingItemModel] = Field(
|
||||
title="Linux",
|
||||
default_factory=list,
|
||||
)
|
||||
darwin: list[DiskMappingItemModel] = Field(
|
||||
title="MacOS",
|
||||
default_factory=list,
|
||||
)
|
||||
|
||||
|
||||
class ImageIOFileRuleModel(BaseSettingsModel):
|
||||
name: str = Field("", title="Rule name")
|
||||
pattern: str = Field("", title="Regex pattern")
|
||||
|
|
@ -97,6 +118,10 @@ class CoreSettings(BaseSettingsModel):
|
|||
widget="textarea",
|
||||
scope=["studio"],
|
||||
)
|
||||
disk_mapping: DiskMappingModel = Field(
|
||||
default_factory=DiskMappingModel,
|
||||
title="Disk mapping",
|
||||
)
|
||||
tools: GlobalToolsModel = Field(
|
||||
default_factory=GlobalToolsModel,
|
||||
title="Tools"
|
||||
|
|
@ -173,7 +198,7 @@ DEFAULT_VALUES = {
|
|||
},
|
||||
"studio_name": "",
|
||||
"studio_code": "",
|
||||
"environments": "{}",
|
||||
"environments": "{\n\"STUDIO_SW\": {\n \"darwin\": \"/mnt/REPO_SW\",\n \"linux\": \"/mnt/REPO_SW\",\n \"windows\": \"P:/REPO_SW\"\n }\n}",
|
||||
"tools": DEFAULT_TOOLS_VALUES,
|
||||
"version_start_category": {
|
||||
"profiles": []
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class ValidateBaseModel(BaseSettingsModel):
|
|||
class CollectAnatomyInstanceDataModel(BaseSettingsModel):
|
||||
_isGroup = True
|
||||
follow_workfile_version: bool = Field(
|
||||
True, title="Collect Anatomy Instance Data"
|
||||
True, title="Follow workfile version"
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -84,7 +84,6 @@ class ValidateIntentModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class ExtractThumbnailFFmpegModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
input: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="FFmpeg input arguments"
|
||||
|
|
@ -95,9 +94,109 @@ class ExtractThumbnailFFmpegModel(BaseSettingsModel):
|
|||
)
|
||||
|
||||
|
||||
class ResizeItemModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
width: int = Field(
|
||||
1920,
|
||||
ge=0,
|
||||
le=100000,
|
||||
title="Width",
|
||||
description="Width and Height must be both set to higher value than 0"
|
||||
" else source resolution is used."
|
||||
)
|
||||
height: int = Field(
|
||||
1080,
|
||||
title="Height",
|
||||
ge=0,
|
||||
le=100000,
|
||||
)
|
||||
|
||||
|
||||
_resize_types_enum = [
|
||||
{"value": "source", "label": "Image source"},
|
||||
{"value": "resize", "label": "Resize"},
|
||||
]
|
||||
|
||||
|
||||
class ResizeModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
|
||||
type: str = Field(
|
||||
title="Type",
|
||||
description="Type of resizing",
|
||||
enum_resolver=lambda: _resize_types_enum,
|
||||
conditionalEnum=True,
|
||||
default="source"
|
||||
)
|
||||
|
||||
resize: ResizeItemModel = Field(
|
||||
default_factory=ResizeItemModel,
|
||||
title="Resize"
|
||||
)
|
||||
|
||||
|
||||
_thumbnail_oiio_transcoding_type = [
|
||||
{"value": "colorspace", "label": "Use Colorspace"},
|
||||
{"value": "display_and_view", "label": "Use Display&View"}
|
||||
]
|
||||
|
||||
|
||||
class DisplayAndViewModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
display: str = Field(
|
||||
"default",
|
||||
title="Display"
|
||||
)
|
||||
view: str = Field(
|
||||
"sRGB",
|
||||
title="View"
|
||||
)
|
||||
|
||||
|
||||
class ExtractThumbnailOIIODefaultsModel(BaseSettingsModel):
|
||||
type: str = Field(
|
||||
title="Type",
|
||||
description="Transcoding type",
|
||||
enum_resolver=lambda: _thumbnail_oiio_transcoding_type,
|
||||
conditionalEnum=True,
|
||||
default="colorspace"
|
||||
)
|
||||
|
||||
colorspace: str = Field(
|
||||
"",
|
||||
title="Colorspace"
|
||||
)
|
||||
display_and_view: DisplayAndViewModel = Field(
|
||||
default_factory=DisplayAndViewModel,
|
||||
title="Display&View"
|
||||
)
|
||||
|
||||
|
||||
class ExtractThumbnailModel(BaseSettingsModel):
|
||||
_isGroup = True
|
||||
enabled: bool = Field(True)
|
||||
integrate_thumbnail: bool = Field(
|
||||
True,
|
||||
title="Integrate Thumbnail Representation"
|
||||
)
|
||||
target_size: ResizeModel = Field(
|
||||
default_factory=ResizeModel,
|
||||
title="Target size"
|
||||
)
|
||||
background_color: ColorRGBA_uint8 = Field(
|
||||
(0, 0, 0, 0.0),
|
||||
title="Background color"
|
||||
)
|
||||
duration_split: float = Field(
|
||||
0.5,
|
||||
title="Duration split",
|
||||
ge=0.0,
|
||||
le=1.0
|
||||
)
|
||||
oiiotool_defaults: ExtractThumbnailOIIODefaultsModel = Field(
|
||||
default_factory=ExtractThumbnailOIIODefaultsModel,
|
||||
title="OIIOtool defaults"
|
||||
)
|
||||
ffmpeg_args: ExtractThumbnailFFmpegModel = Field(
|
||||
default_factory=ExtractThumbnailFFmpegModel
|
||||
)
|
||||
|
|
@ -741,6 +840,15 @@ DEFAULT_PUBLISH_VALUES = {
|
|||
},
|
||||
"ExtractThumbnail": {
|
||||
"enabled": True,
|
||||
"integrate_thumbnail": True,
|
||||
"target_size": {
|
||||
"type": "source"
|
||||
},
|
||||
"duration_split": 0.5,
|
||||
"oiiotool_defaults": {
|
||||
"type": "colorspace",
|
||||
"colorspace": "color_picking"
|
||||
},
|
||||
"ffmpeg_args": {
|
||||
"input": [
|
||||
"-apply_trc gamma22"
|
||||
|
|
|
|||
|
|
@ -487,6 +487,17 @@ DEFAULT_TOOLS_VALUES = {
|
|||
"task_types": [],
|
||||
"task_names": [],
|
||||
"template_name": "publish_online"
|
||||
},
|
||||
{
|
||||
"product_types": [
|
||||
"tycache"
|
||||
],
|
||||
"hosts": [
|
||||
"max"
|
||||
],
|
||||
"task_types": [],
|
||||
"task_names": [],
|
||||
"template_name": "publish_tycache"
|
||||
}
|
||||
],
|
||||
"hero_template_name_profiles": [
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.4"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import sys
|
|||
import re
|
||||
import json
|
||||
import shutil
|
||||
import argparse
|
||||
import zipfile
|
||||
import platform
|
||||
import collections
|
||||
|
|
@ -32,6 +33,20 @@ IGNORE_FILE_PATTERNS: List[Pattern] = [
|
|||
}
|
||||
]
|
||||
|
||||
IGNORED_HOSTS = [
|
||||
"flame",
|
||||
"harmony",
|
||||
]
|
||||
|
||||
IGNORED_MODULES = [
|
||||
"ftrack",
|
||||
"shotgrid",
|
||||
"sync_server",
|
||||
"example_addons",
|
||||
"slack",
|
||||
"kitsu",
|
||||
]
|
||||
|
||||
|
||||
class ZipFileLongPaths(zipfile.ZipFile):
|
||||
"""Allows longer paths in zip files.
|
||||
|
|
@ -184,9 +199,12 @@ def create_openpype_package(
|
|||
|
||||
addon_output_dir = output_dir / "openpype" / addon_version
|
||||
private_dir = addon_output_dir / "private"
|
||||
if addon_output_dir.exists():
|
||||
shutil.rmtree(str(addon_output_dir))
|
||||
|
||||
# Make sure dir exists
|
||||
addon_output_dir.mkdir(parents=True)
|
||||
private_dir.mkdir(parents=True)
|
||||
addon_output_dir.mkdir(parents=True, exist_ok=True)
|
||||
private_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Copy version
|
||||
shutil.copy(str(version_path), str(addon_output_dir))
|
||||
|
|
@ -198,15 +216,6 @@ def create_openpype_package(
|
|||
str(pyproject_path),
|
||||
(private_dir / pyproject_path.name)
|
||||
)
|
||||
|
||||
ignored_hosts = []
|
||||
ignored_modules = [
|
||||
"ftrack",
|
||||
"shotgrid",
|
||||
"sync_server",
|
||||
"example_addons",
|
||||
"slack"
|
||||
]
|
||||
# Subdirs that won't be added to output zip file
|
||||
ignored_subpaths = [
|
||||
["addons"],
|
||||
|
|
@ -214,11 +223,11 @@ def create_openpype_package(
|
|||
]
|
||||
ignored_subpaths.extend(
|
||||
["hosts", host_name]
|
||||
for host_name in ignored_hosts
|
||||
for host_name in IGNORED_HOSTS
|
||||
)
|
||||
ignored_subpaths.extend(
|
||||
["modules", module_name]
|
||||
for module_name in ignored_modules
|
||||
for module_name in IGNORED_MODULES
|
||||
)
|
||||
|
||||
# Zip client
|
||||
|
|
@ -268,22 +277,41 @@ def create_addon_package(
|
|||
)
|
||||
|
||||
|
||||
def main(create_zip=True, keep_source=False):
|
||||
def main(
|
||||
output_dir=None,
|
||||
skip_zip=True,
|
||||
keep_source=False,
|
||||
clear_output_dir=False,
|
||||
addons=None,
|
||||
):
|
||||
current_dir = Path(os.path.dirname(os.path.abspath(__file__)))
|
||||
root_dir = current_dir.parent
|
||||
output_dir = current_dir / "packages"
|
||||
print("Package creation started...")
|
||||
create_zip = not skip_zip
|
||||
|
||||
# Make sure package dir is empty
|
||||
if output_dir.exists():
|
||||
if output_dir:
|
||||
output_dir = Path(output_dir)
|
||||
else:
|
||||
output_dir = current_dir / "packages"
|
||||
|
||||
if output_dir.exists() and clear_output_dir:
|
||||
shutil.rmtree(str(output_dir))
|
||||
# Make sure output dir is created
|
||||
output_dir.mkdir(parents=True)
|
||||
|
||||
print("Package creation started...")
|
||||
print(f"Output directory: {output_dir}")
|
||||
|
||||
# Make sure output dir is created
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
ignored_addons = set(IGNORED_HOSTS) | set(IGNORED_MODULES)
|
||||
for addon_dir in current_dir.iterdir():
|
||||
if not addon_dir.is_dir():
|
||||
continue
|
||||
|
||||
if addons and addon_dir.name not in addons:
|
||||
continue
|
||||
|
||||
if addon_dir.name in ignored_addons:
|
||||
continue
|
||||
|
||||
server_dir = addon_dir / "server"
|
||||
if not server_dir.exists():
|
||||
continue
|
||||
|
|
@ -303,6 +331,54 @@ def main(create_zip=True, keep_source=False):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
create_zip = "--skip-zip" not in sys.argv
|
||||
keep_sources = "--keep-sources" in sys.argv
|
||||
main(create_zip, keep_sources)
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--skip-zip",
|
||||
dest="skip_zip",
|
||||
action="store_true",
|
||||
help=(
|
||||
"Skip zipping server package and create only"
|
||||
" server folder structure."
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"--keep-sources",
|
||||
dest="keep_sources",
|
||||
action="store_true",
|
||||
help=(
|
||||
"Keep folder structure when server package is created."
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-o", "--output",
|
||||
dest="output_dir",
|
||||
default=None,
|
||||
help=(
|
||||
"Directory path where package will be created"
|
||||
" (Will be purged if already exists!)"
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-c", "--clear-output-dir",
|
||||
dest="clear_output_dir",
|
||||
action="store_true",
|
||||
help=(
|
||||
"Clear output directory before package creation."
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
"-a",
|
||||
"--addon",
|
||||
dest="addons",
|
||||
action="append",
|
||||
help="Limit addon creation to given addon name",
|
||||
)
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
main(
|
||||
args.output_dir,
|
||||
args.skip_zip,
|
||||
args.keep_sources,
|
||||
args.clear_output_dir,
|
||||
args.addons,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -14,15 +14,35 @@ class ServerListSubmodel(BaseSettingsModel):
|
|||
value: str = Field(title="Value")
|
||||
|
||||
|
||||
async def defined_deadline_ws_name_enum_resolver(
|
||||
addon: "BaseServerAddon",
|
||||
settings_variant: str = "production",
|
||||
project_name: str | None = None,
|
||||
) -> list[str]:
|
||||
"""Provides list of names of configured Deadline webservice urls."""
|
||||
if addon is None:
|
||||
return []
|
||||
|
||||
settings = await addon.get_studio_settings(variant=settings_variant)
|
||||
|
||||
ws_urls = []
|
||||
for deadline_url_item in settings.deadline_urls:
|
||||
ws_urls.append(deadline_url_item.name)
|
||||
|
||||
return ws_urls
|
||||
|
||||
|
||||
class DeadlineSettings(BaseSettingsModel):
|
||||
deadline_urls: list[ServerListSubmodel] = Field(
|
||||
default_factory=list,
|
||||
title="System Deadline Webservice URLs",
|
||||
scope=["studio"],
|
||||
)
|
||||
deadline_servers: list[str] = Field(
|
||||
title="Project deadline servers",
|
||||
deadline_server: str = Field(
|
||||
title="Project deadline server",
|
||||
section="---",
|
||||
scope=["project"],
|
||||
enum_resolver=defined_deadline_ws_name_enum_resolver
|
||||
)
|
||||
publish: PublishPluginsModel = Field(
|
||||
default_factory=PublishPluginsModel,
|
||||
|
|
@ -42,7 +62,6 @@ DEFAULT_VALUES = {
|
|||
"value": "http://127.0.0.1:8082"
|
||||
}
|
||||
],
|
||||
# TODO: this needs to be dynamic from "deadline_urls"
|
||||
"deadline_servers": [],
|
||||
"deadline_server": "default",
|
||||
"publish": DEFAULT_DEADLINE_PLUGINS_SETTINGS
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,6 @@ from pydantic import Field, validator
|
|||
from ayon_server.settings import BaseSettingsModel, ensure_unique_names
|
||||
|
||||
|
||||
class CollectDefaultDeadlineServerModel(BaseSettingsModel):
|
||||
"""Settings for event handlers running in ftrack service."""
|
||||
|
||||
pass_mongo_url: bool = Field(title="Pass Mongo url to job")
|
||||
|
||||
|
||||
class CollectDeadlinePoolsModel(BaseSettingsModel):
|
||||
"""Settings Deadline default pools."""
|
||||
|
||||
|
|
@ -237,6 +231,7 @@ class BlenderSubmitDeadlineModel(BaseSettingsModel):
|
|||
priority: int = Field(title="Priority")
|
||||
chunk_size: int = Field(title="Frame per Task")
|
||||
group: str = Field("", title="Group Name")
|
||||
job_delay: str = Field("", title="Delay job (timecode dd:hh:mm:ss)")
|
||||
|
||||
|
||||
class AOVFilterSubmodel(BaseSettingsModel):
|
||||
|
|
@ -248,6 +243,17 @@ class AOVFilterSubmodel(BaseSettingsModel):
|
|||
)
|
||||
|
||||
|
||||
class ProcessCacheJobFarmModel(BaseSettingsModel):
|
||||
"""Process submitted job on farm."""
|
||||
|
||||
enabled: bool = Field(title="Enabled")
|
||||
deadline_department: str = Field(title="Department")
|
||||
deadline_pool: str = Field(title="Pool")
|
||||
deadline_group: str = Field(title="Group")
|
||||
deadline_chunk_size: int = Field(title="Chunk Size")
|
||||
deadline_priority: int = Field(title="Priority")
|
||||
|
||||
|
||||
class ProcessSubmittedJobOnFarmModel(BaseSettingsModel):
|
||||
"""Process submitted job on farm."""
|
||||
|
||||
|
|
@ -267,19 +273,13 @@ class ProcessSubmittedJobOnFarmModel(BaseSettingsModel):
|
|||
title="Reviewable products filter",
|
||||
)
|
||||
|
||||
@validator("aov_filter", "skip_integration_repre_list")
|
||||
@validator("aov_filter")
|
||||
def validate_unique_names(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class PublishPluginsModel(BaseSettingsModel):
|
||||
CollectDefaultDeadlineServer: CollectDefaultDeadlineServerModel = Field(
|
||||
default_factory=CollectDefaultDeadlineServerModel,
|
||||
title="Default Deadline Webservice")
|
||||
CollectDefaultDeadlineServer: CollectDefaultDeadlineServerModel = Field(
|
||||
default_factory=CollectDefaultDeadlineServerModel,
|
||||
title="Default Deadline Webservice")
|
||||
CollectDeadlinePools: CollectDeadlinePoolsModel = Field(
|
||||
default_factory=CollectDeadlinePoolsModel,
|
||||
title="Default Pools")
|
||||
|
|
@ -311,15 +311,15 @@ class PublishPluginsModel(BaseSettingsModel):
|
|||
BlenderSubmitDeadline: BlenderSubmitDeadlineModel = Field(
|
||||
default_factory=BlenderSubmitDeadlineModel,
|
||||
title="Blender Submit Deadline")
|
||||
ProcessSubmittedCacheJobOnFarm: ProcessCacheJobFarmModel = Field(
|
||||
default_factory=ProcessCacheJobFarmModel,
|
||||
title="Process submitted cache Job on farm.")
|
||||
ProcessSubmittedJobOnFarm: ProcessSubmittedJobOnFarmModel = Field(
|
||||
default_factory=ProcessSubmittedJobOnFarmModel,
|
||||
title="Process submitted job on farm.")
|
||||
|
||||
|
||||
DEFAULT_DEADLINE_PLUGINS_SETTINGS = {
|
||||
"CollectDefaultDeadlineServer": {
|
||||
"pass_mongo_url": True
|
||||
},
|
||||
"CollectDeadlinePools": {
|
||||
"primary_pool": "",
|
||||
"secondary_pool": ""
|
||||
|
|
@ -424,7 +424,16 @@ DEFAULT_DEADLINE_PLUGINS_SETTINGS = {
|
|||
"use_published": True,
|
||||
"priority": 50,
|
||||
"chunk_size": 10,
|
||||
"group": "none"
|
||||
"group": "none",
|
||||
"job_delay": "00:00:00:00"
|
||||
},
|
||||
"ProcessSubmittedCacheJobOnFarm": {
|
||||
"enabled": True,
|
||||
"deadline_department": "",
|
||||
"deadline_pool": "",
|
||||
"deadline_group": "",
|
||||
"deadline_chunk_size": 1,
|
||||
"deadline_priority": 50
|
||||
},
|
||||
"ProcessSubmittedJobOnFarm": {
|
||||
"enabled": True,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.5"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,16 @@ def _create_saver_instance_attributes_enum():
|
|||
]
|
||||
|
||||
|
||||
def _image_format_enum():
|
||||
return [
|
||||
{"value": "exr", "label": "exr"},
|
||||
{"value": "tga", "label": "tga"},
|
||||
{"value": "png", "label": "png"},
|
||||
{"value": "tif", "label": "tif"},
|
||||
{"value": "jpg", "label": "jpg"},
|
||||
]
|
||||
|
||||
|
||||
class CreateSaverPluginModel(BaseSettingsModel):
|
||||
_isGroup = True
|
||||
temp_rendering_path_template: str = Field(
|
||||
|
|
@ -39,6 +49,10 @@ class CreateSaverPluginModel(BaseSettingsModel):
|
|||
enum_resolver=_create_saver_instance_attributes_enum,
|
||||
title="Instance attributes"
|
||||
)
|
||||
image_format: str = Field(
|
||||
enum_resolver=_image_format_enum,
|
||||
title="Output Image Format"
|
||||
)
|
||||
|
||||
|
||||
class CreatPluginsModel(BaseSettingsModel):
|
||||
|
|
@ -89,7 +103,8 @@ DEFAULT_VALUES = {
|
|||
"instance_attributes": [
|
||||
"reviewable",
|
||||
"farm_rendering"
|
||||
]
|
||||
],
|
||||
"image_format": "exr"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.1"
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ class ScriptsmenuSettings(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_SCRIPTSMENU_SETTINGS = {
|
||||
"name": "OpenPype Tools",
|
||||
"name": "Custom Tools",
|
||||
"definition": [
|
||||
{
|
||||
"type": "action",
|
||||
"sourcetype": "python",
|
||||
"title": "OpenPype Docs",
|
||||
"command": "import webbrowser;webbrowser.open(url='https://openpype.io/docs/artist_hosts_hiero')",
|
||||
"tooltip": "Open the OpenPype Hiero user doc page"
|
||||
"title": "Ayon Hiero Docs",
|
||||
"command": "import webbrowser;webbrowser.open(url='https://ayon.ynput.io/docs/addon_hiero_artist')", # noqa
|
||||
"tooltip": "Open the Ayon Hiero user doc page"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.1"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
|
|
@ -27,7 +26,7 @@ class CreateStaticMeshModel(BaseSettingsModel):
|
|||
default_factory=list,
|
||||
title="Default Products"
|
||||
)
|
||||
static_mesh_prefixes: str = Field("S", title="Static Mesh Prefix")
|
||||
static_mesh_prefix: str = Field("S", title="Static Mesh Prefix")
|
||||
collision_prefixes: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Collision Prefixes"
|
||||
|
|
@ -35,52 +34,117 @@ class CreateStaticMeshModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class CreatePluginsModel(BaseSettingsModel):
|
||||
CreateArnoldAss: CreateArnoldAssModel = Field(
|
||||
default_factory=CreateArnoldAssModel,
|
||||
title="Create Alembic Camera")
|
||||
# "-" is not compatible in the new model
|
||||
CreateStaticMesh: CreateStaticMeshModel = Field(
|
||||
default_factory=CreateStaticMeshModel,
|
||||
title="Create Static Mesh"
|
||||
)
|
||||
CreateAlembicCamera: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Alembic Camera")
|
||||
CreateArnoldAss: CreateArnoldAssModel = Field(
|
||||
default_factory=CreateArnoldAssModel,
|
||||
title="Create Arnold Ass")
|
||||
CreateArnoldRop: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Arnold ROP")
|
||||
CreateCompositeSequence: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Composite Sequence")
|
||||
title="Create Composite (Image Sequence)")
|
||||
CreateHDA: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Houdini Digital Asset")
|
||||
CreateKarmaROP: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Karma ROP")
|
||||
CreateMantraIFD: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Mantra IFD")
|
||||
CreateMantraROP: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Mantra ROP")
|
||||
CreatePointCache: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Point Cache")
|
||||
title="Create PointCache (Abc)")
|
||||
CreateBGEO: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create PointCache (Bgeo)")
|
||||
CreateRedshiftProxy: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Redshift Proxy")
|
||||
CreateRedshiftROP: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create RedshiftROP")
|
||||
CreateRemotePublish: CreatorModel = Field(
|
||||
title="Create Redshift ROP")
|
||||
CreateReview: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create Remote Publish")
|
||||
title="Create Review")
|
||||
# "-" is not compatible in the new model
|
||||
CreateStaticMesh: CreateStaticMeshModel = Field(
|
||||
default_factory=CreateStaticMeshModel,
|
||||
title="Create Static Mesh")
|
||||
CreateUSD: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create USD (experimental)")
|
||||
CreateUSDRender: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create USD render (experimental)")
|
||||
CreateVDBCache: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create VDB Cache")
|
||||
CreateUSD: CreatorModel = Field(
|
||||
CreateVrayROP: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create USD")
|
||||
CreateUSDModel: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create USD model")
|
||||
USDCreateShadingWorkspace: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create USD shading workspace")
|
||||
CreateUSDRender: CreatorModel = Field(
|
||||
default_factory=CreatorModel,
|
||||
title="Create USD render")
|
||||
title="Create VRay ROP")
|
||||
|
||||
|
||||
DEFAULT_HOUDINI_CREATE_SETTINGS = {
|
||||
"CreateAlembicCamera": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateArnoldAss": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"],
|
||||
"ext": ".ass"
|
||||
},
|
||||
"CreateArnoldRop": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateCompositeSequence": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateHDA": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateKarmaROP": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateMantraIFD": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateMantraROP": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreatePointCache": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateBGEO": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateRedshiftProxy": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateRedshiftROP": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateReview": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateStaticMesh": {
|
||||
"enabled": True,
|
||||
"default_variants": [
|
||||
|
|
@ -94,126 +158,20 @@ DEFAULT_HOUDINI_CREATE_SETTINGS = {
|
|||
"UCX"
|
||||
]
|
||||
},
|
||||
"CreateAlembicCamera": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateCompositeSequence": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreatePointCache": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateRedshiftROP": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateRemotePublish": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateVDBCache": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateUSD": {
|
||||
"enabled": False,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateUSDModel": {
|
||||
"enabled": False,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"USDCreateShadingWorkspace": {
|
||||
"enabled": False,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateUSDRender": {
|
||||
"enabled": False,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# Publish Plugins
|
||||
class ValidateWorkfilePathsModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
node_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Node Types"
|
||||
)
|
||||
prohibited_vars: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Prohibited Variables"
|
||||
)
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
|
||||
|
||||
class PublishPluginsModel(BaseSettingsModel):
|
||||
ValidateWorkfilePaths: ValidateWorkfilePathsModel = Field(
|
||||
default_factory=ValidateWorkfilePathsModel,
|
||||
title="Validate workfile paths settings.")
|
||||
ValidateReviewColorspace: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Review Colorspace.")
|
||||
ValidateContainers: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Latest Containers.")
|
||||
ValidateSubsetName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Subset Name.")
|
||||
ValidateMeshIsStatic: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Mesh is Static.")
|
||||
ValidateUnrealStaticMeshName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Unreal Static Mesh Name.")
|
||||
|
||||
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS = {
|
||||
"ValidateWorkfilePaths": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"node_types": [
|
||||
"file",
|
||||
"alembic"
|
||||
],
|
||||
"prohibited_vars": [
|
||||
"$HIP",
|
||||
"$JOB"
|
||||
]
|
||||
},
|
||||
"ValidateReviewColorspace": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateContainers": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateSubsetName": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateMeshIsStatic": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateUnrealStaticMeshName": {
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
}
|
||||
"CreateVDBCache": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
"CreateVrayROP": {
|
||||
"enabled": True,
|
||||
"default_variants": ["Main"]
|
||||
},
|
||||
}
|
||||
|
|
@ -25,6 +25,10 @@ class UpdateHoudiniVarcontextModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class GeneralSettingsModel(BaseSettingsModel):
|
||||
add_self_publish_button: bool = Field(
|
||||
False,
|
||||
title="Add Self Publish Button"
|
||||
)
|
||||
update_houdini_var_context: UpdateHoudiniVarcontextModel = Field(
|
||||
default_factory=UpdateHoudiniVarcontextModel,
|
||||
title="Update Houdini Vars on context change"
|
||||
|
|
@ -32,6 +36,7 @@ class GeneralSettingsModel(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_GENERAL_SETTINGS = {
|
||||
"add_self_publish_button": False,
|
||||
"update_houdini_var_context": {
|
||||
"enabled": True,
|
||||
"houdini_vars": [
|
||||
|
|
|
|||
|
|
@ -1,57 +1,19 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import (
|
||||
BaseSettingsModel,
|
||||
MultiplatformPathModel,
|
||||
MultiplatformPathListModel,
|
||||
)
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from .general import (
|
||||
GeneralSettingsModel,
|
||||
DEFAULT_GENERAL_SETTINGS
|
||||
)
|
||||
from .imageio import HoudiniImageIOModel
|
||||
from .publish_plugins import (
|
||||
PublishPluginsModel,
|
||||
from .shelves import ShelvesModel
|
||||
from .create import (
|
||||
CreatePluginsModel,
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS,
|
||||
DEFAULT_HOUDINI_CREATE_SETTINGS
|
||||
)
|
||||
|
||||
|
||||
class ShelfToolsModel(BaseSettingsModel):
|
||||
name: str = Field(title="Name")
|
||||
help: str = Field(title="Help text")
|
||||
script: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Script Path "
|
||||
)
|
||||
icon: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Icon Path "
|
||||
)
|
||||
|
||||
|
||||
class ShelfDefinitionModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_name: str = Field(title="Shelf name")
|
||||
tools_list: list[ShelfToolsModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Tools"
|
||||
)
|
||||
|
||||
|
||||
class ShelvesModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_set_name: str = Field(title="Shelfs set name")
|
||||
|
||||
shelf_set_source_path: MultiplatformPathListModel = Field(
|
||||
default_factory=MultiplatformPathListModel,
|
||||
title="Shelf Set Path (optional)"
|
||||
)
|
||||
|
||||
shelf_definition: list[ShelfDefinitionModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Definitions"
|
||||
)
|
||||
from .publish import (
|
||||
PublishPluginsModel,
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS,
|
||||
)
|
||||
|
||||
|
||||
class HoudiniSettings(BaseSettingsModel):
|
||||
|
|
@ -65,18 +27,16 @@ class HoudiniSettings(BaseSettingsModel):
|
|||
)
|
||||
shelves: list[ShelvesModel] = Field(
|
||||
default_factory=list,
|
||||
title="Houdini Scripts Shelves",
|
||||
title="Shelves Manager",
|
||||
)
|
||||
|
||||
publish: PublishPluginsModel = Field(
|
||||
default_factory=PublishPluginsModel,
|
||||
title="Publish Plugins",
|
||||
)
|
||||
|
||||
create: CreatePluginsModel = Field(
|
||||
default_factory=CreatePluginsModel,
|
||||
title="Creator Plugins",
|
||||
)
|
||||
publish: PublishPluginsModel = Field(
|
||||
default_factory=PublishPluginsModel,
|
||||
title="Publish Plugins",
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_VALUES = {
|
||||
|
|
|
|||
120
server_addon/houdini/server/settings/publish.py
Normal file
120
server_addon/houdini/server/settings/publish.py
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
# Publish Plugins
|
||||
class CollectAssetHandlesModel(BaseSettingsModel):
|
||||
"""Collect Frame Range
|
||||
Disable this if you want the publisher to
|
||||
ignore start and end handles specified in the
|
||||
asset data for publish instances
|
||||
"""
|
||||
use_asset_handles: bool = Field(
|
||||
title="Use asset handles")
|
||||
|
||||
|
||||
class CollectChunkSizeModel(BaseSettingsModel):
|
||||
"""Collect Chunk Size."""
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
chunk_size: int = Field(
|
||||
title="Frames Per Task")
|
||||
|
||||
|
||||
class ValidateWorkfilePathsModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
node_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Node Types"
|
||||
)
|
||||
prohibited_vars: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Prohibited Variables"
|
||||
)
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
|
||||
|
||||
class PublishPluginsModel(BaseSettingsModel):
|
||||
CollectAssetHandles: CollectAssetHandlesModel = Field(
|
||||
default_factory=CollectAssetHandlesModel,
|
||||
title="Collect Asset Handles.",
|
||||
section="Collectors"
|
||||
)
|
||||
CollectChunkSize: CollectChunkSizeModel = Field(
|
||||
default_factory=CollectChunkSizeModel,
|
||||
title="Collect Chunk Size."
|
||||
)
|
||||
ValidateContainers: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Latest Containers.",
|
||||
section="Validators")
|
||||
ValidateMeshIsStatic: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Mesh is Static.")
|
||||
ValidateReviewColorspace: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Review Colorspace.")
|
||||
ValidateSubsetName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Subset Name.")
|
||||
ValidateUnrealStaticMeshName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Unreal Static Mesh Name.")
|
||||
ValidateWorkfilePaths: ValidateWorkfilePathsModel = Field(
|
||||
default_factory=ValidateWorkfilePathsModel,
|
||||
title="Validate workfile paths settings.")
|
||||
|
||||
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS = {
|
||||
"CollectAssetHandles": {
|
||||
"use_asset_handles": True
|
||||
},
|
||||
"CollectChunkSize": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"chunk_size": 999999
|
||||
},
|
||||
"ValidateContainers": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateMeshIsStatic": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateReviewColorspace": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateSubsetName": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateUnrealStaticMeshName": {
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateWorkfilePaths": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"node_types": [
|
||||
"file",
|
||||
"alembic"
|
||||
],
|
||||
"prohibited_vars": [
|
||||
"$HIP",
|
||||
"$JOB"
|
||||
]
|
||||
}
|
||||
}
|
||||
67
server_addon/houdini/server/settings/shelves.py
Normal file
67
server_addon/houdini/server/settings/shelves.py
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import (
|
||||
BaseSettingsModel,
|
||||
MultiplatformPathModel
|
||||
)
|
||||
|
||||
|
||||
class ShelfToolsModel(BaseSettingsModel):
|
||||
"""Name and Script Path are mandatory."""
|
||||
label: str = Field(title="Name")
|
||||
script: str = Field(title="Script Path")
|
||||
icon: str = Field("", title="Icon Path")
|
||||
help: str = Field("", title="Help text")
|
||||
|
||||
|
||||
class ShelfDefinitionModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_name: str = Field(title="Shelf name")
|
||||
tools_list: list[ShelfToolsModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Tools"
|
||||
)
|
||||
|
||||
|
||||
class AddShelfFileModel(BaseSettingsModel):
|
||||
shelf_set_source_path: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Shelf Set Path"
|
||||
)
|
||||
|
||||
|
||||
class AddSetAndDefinitionsModel(BaseSettingsModel):
|
||||
shelf_set_name: str = Field("", title="Shelf Set Name")
|
||||
shelf_definition: list[ShelfDefinitionModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelves Definitions"
|
||||
)
|
||||
|
||||
|
||||
def shelves_enum_options():
|
||||
return [
|
||||
{
|
||||
"value": "add_shelf_file",
|
||||
"label": "Add a .shelf file"
|
||||
},
|
||||
{
|
||||
"value": "add_set_and_definitions",
|
||||
"label": "Add Shelf Set Name and Shelves Definitions"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
class ShelvesModel(BaseSettingsModel):
|
||||
options: str = Field(
|
||||
title="Options",
|
||||
description="Switch between shelves manager options",
|
||||
enum_resolver=shelves_enum_options,
|
||||
conditionalEnum=True
|
||||
)
|
||||
add_shelf_file: AddShelfFileModel = Field(
|
||||
title="Add a .shelf file",
|
||||
default_factory=AddShelfFileModel
|
||||
)
|
||||
add_set_and_definitions: AddSetAndDefinitionsModel = Field(
|
||||
title="Add Shelf Set Name and Shelves Definitions",
|
||||
default_factory=AddSetAndDefinitionsModel
|
||||
)
|
||||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.4"
|
||||
__version__ = "0.2.10"
|
||||
|
|
|
|||
93
server_addon/max/server/settings/create_review_settings.py
Normal file
93
server_addon/max/server/settings/create_review_settings.py
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
def image_format_enum():
|
||||
"""Return enumerator for image output formats."""
|
||||
return [
|
||||
{"label": "exr", "value": "exr"},
|
||||
{"label": "jpg", "value": "jpg"},
|
||||
{"label": "png", "value": "png"},
|
||||
{"label": "tga", "value": "tga"}
|
||||
]
|
||||
|
||||
|
||||
def visual_style_enum():
|
||||
"""Return enumerator for viewport visual style."""
|
||||
return [
|
||||
{"label": "Realistic", "value": "Realistic"},
|
||||
{"label": "Shaded", "value": "Shaded"},
|
||||
{"label": "Facets", "value": "Facets"},
|
||||
{"label": "ConsistentColors",
|
||||
"value": "ConsistentColors"},
|
||||
{"label": "Wireframe", "value": "Wireframe"},
|
||||
{"label": "BoundingBox", "value": "BoundingBox"},
|
||||
{"label": "Ink", "value": "Ink"},
|
||||
{"label": "ColorInk", "value": "ColorInk"},
|
||||
{"label": "Acrylic", "value": "Acrylic"},
|
||||
{"label": "Tech", "value": "Tech"},
|
||||
{"label": "Graphite", "value": "Graphite"},
|
||||
{"label": "ColorPencil", "value": "ColorPencil"},
|
||||
{"label": "Pastel", "value": "Pastel"},
|
||||
{"label": "Clay", "value": "Clay"},
|
||||
{"label": "ModelAssist", "value": "ModelAssist"}
|
||||
]
|
||||
|
||||
|
||||
def preview_preset_enum():
|
||||
"""Return enumerator for viewport visual preset."""
|
||||
return [
|
||||
{"label": "Quality", "value": "Quality"},
|
||||
{"label": "Standard", "value": "Standard"},
|
||||
{"label": "Performance", "value": "Performance"},
|
||||
{"label": "DXMode", "value": "DXMode"},
|
||||
{"label": "Customize", "value": "Customize"},
|
||||
]
|
||||
|
||||
|
||||
def anti_aliasing_enum():
|
||||
"""Return enumerator for viewport anti-aliasing."""
|
||||
return [
|
||||
{"label": "None", "value": "None"},
|
||||
{"label": "2X", "value": "2X"},
|
||||
{"label": "4X", "value": "4X"},
|
||||
{"label": "8X", "value": "8X"}
|
||||
]
|
||||
|
||||
|
||||
class CreateReviewModel(BaseSettingsModel):
|
||||
review_width: int = Field(1920, title="Review Width")
|
||||
review_height: int = Field(1080, title="Review Height")
|
||||
percentSize: float = Field(100.0, title="Percent of Output")
|
||||
keep_images: bool = Field(False, title="Keep Image Sequences")
|
||||
image_format: str = Field(
|
||||
enum_resolver=image_format_enum,
|
||||
title="Image Format Options"
|
||||
)
|
||||
visual_style: str = Field(
|
||||
enum_resolver=visual_style_enum,
|
||||
title="Preference"
|
||||
)
|
||||
viewport_preset: str = Field(
|
||||
enum_resolver=preview_preset_enum,
|
||||
title="Preview Preset"
|
||||
)
|
||||
anti_aliasing: str = Field(
|
||||
enum_resolver=anti_aliasing_enum,
|
||||
title="Anti-aliasing Quality"
|
||||
)
|
||||
vp_texture: bool = Field(True, title="Viewport Texture")
|
||||
|
||||
|
||||
DEFAULT_CREATE_REVIEW_SETTINGS = {
|
||||
"review_width": 1920,
|
||||
"review_height": 1080,
|
||||
"percentSize": 100.0,
|
||||
"keep_images": False,
|
||||
"image_format": "png",
|
||||
"visual_style": "Realistic",
|
||||
"viewport_preset": "Quality",
|
||||
"anti_aliasing": "None",
|
||||
"vp_texture": True
|
||||
}
|
||||
|
|
@ -4,6 +4,9 @@ from .imageio import ImageIOSettings
|
|||
from .render_settings import (
|
||||
RenderSettingsModel, DEFAULT_RENDER_SETTINGS
|
||||
)
|
||||
from .create_review_settings import (
|
||||
CreateReviewModel, DEFAULT_CREATE_REVIEW_SETTINGS
|
||||
)
|
||||
from .publishers import (
|
||||
PublishersModel, DEFAULT_PUBLISH_SETTINGS
|
||||
)
|
||||
|
|
@ -29,6 +32,10 @@ class MaxSettings(BaseSettingsModel):
|
|||
default_factory=RenderSettingsModel,
|
||||
title="Render Settings"
|
||||
)
|
||||
CreateReview: CreateReviewModel = Field(
|
||||
default_factory=CreateReviewModel,
|
||||
title="Create Review"
|
||||
)
|
||||
PointCloud: PointCloudSettings = Field(
|
||||
default_factory=PointCloudSettings,
|
||||
title="Point Cloud"
|
||||
|
|
@ -40,6 +47,7 @@ class MaxSettings(BaseSettingsModel):
|
|||
|
||||
DEFAULT_VALUES = {
|
||||
"RenderSettings": DEFAULT_RENDER_SETTINGS,
|
||||
"CreateReview": DEFAULT_CREATE_REVIEW_SETTINGS,
|
||||
"PointCloud": {
|
||||
"attribute": [
|
||||
{"name": "Age", "value": "age"},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,50 @@
|
|||
from pydantic import Field
|
||||
import json
|
||||
from pydantic import Field, validator
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.exceptions import BadRequestException
|
||||
|
||||
|
||||
class ValidateAttributesModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="ValidateAttributes")
|
||||
attributes: str = Field(
|
||||
"{}", title="Attributes", widget="textarea")
|
||||
|
||||
@validator("attributes")
|
||||
def validate_json(cls, value):
|
||||
if not value.strip():
|
||||
return "{}"
|
||||
try:
|
||||
converted_value = json.loads(value)
|
||||
success = isinstance(converted_value, dict)
|
||||
except json.JSONDecodeError:
|
||||
success = False
|
||||
|
||||
if not success:
|
||||
raise BadRequestException(
|
||||
"The attibutes can't be parsed as json object"
|
||||
)
|
||||
return value
|
||||
|
||||
|
||||
class FamilyMappingItemModel(BaseSettingsModel):
|
||||
product_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Product Types"
|
||||
)
|
||||
plugins: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Plugins"
|
||||
)
|
||||
|
||||
|
||||
class ValidateLoadedPluginModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
family_plugins_mapping: list[FamilyMappingItemModel] = Field(
|
||||
default_factory=list,
|
||||
title="Family Plugins Mapping"
|
||||
)
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
|
|
@ -15,6 +59,36 @@ class PublishersModel(BaseSettingsModel):
|
|||
title="Validate Frame Range",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateAttributes: ValidateAttributesModel = Field(
|
||||
default_factory=ValidateAttributesModel,
|
||||
title="Validate Attributes"
|
||||
)
|
||||
|
||||
ValidateLoadedPlugin: ValidateLoadedPluginModel = Field(
|
||||
default_factory=ValidateLoadedPluginModel,
|
||||
title="Validate Loaded Plugin"
|
||||
)
|
||||
ExtractModelObj: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract OBJ",
|
||||
section="Extractors"
|
||||
)
|
||||
ExtractModelFbx: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract FBX"
|
||||
)
|
||||
ExtractModelUSD: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract Geometry (USD)"
|
||||
)
|
||||
ExtractModel: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract Geometry (Alembic)"
|
||||
)
|
||||
ExtractMaxSceneRaw: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract Max Scene (Raw)"
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_PUBLISH_SETTINGS = {
|
||||
|
|
@ -22,5 +96,39 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateAttributes": {
|
||||
"enabled": False,
|
||||
"attributes": "{}"
|
||||
},
|
||||
"ValidateLoadedPlugin": {
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"family_plugins_mapping": []
|
||||
},
|
||||
"ExtractModelObj": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": False
|
||||
},
|
||||
"ExtractModelFbx": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": False
|
||||
},
|
||||
"ExtractModelUSD": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": False
|
||||
},
|
||||
"ExtractModel": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ExtractMaxSceneRaw": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.3"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import task_types_enum
|
||||
|
||||
|
||||
class CreateLookModel(BaseSettingsModel):
|
||||
|
|
@ -26,7 +27,7 @@ class CreateUnrealStaticMeshModel(BaseSettingsModel):
|
|||
default_factory=list,
|
||||
title="Default Products"
|
||||
)
|
||||
static_mesh_prefixes: str = Field("S", title="Static Mesh Prefix")
|
||||
static_mesh_prefix: str = Field("S", title="Static Mesh Prefix")
|
||||
collision_prefixes: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Collision Prefixes"
|
||||
|
|
@ -120,6 +121,16 @@ class CreateVrayProxyModel(BaseSettingsModel):
|
|||
default_factory=list, title="Default Products")
|
||||
|
||||
|
||||
class CreateMultishotLayout(BasicCreatorModel):
|
||||
shotParent: str = Field(title="Shot Parent Folder")
|
||||
groupLoadedAssets: bool = Field(title="Group Loaded Assets")
|
||||
task_type: list[str] = Field(
|
||||
title="Task types",
|
||||
enum_resolver=task_types_enum
|
||||
)
|
||||
task_name: str = Field(title="Task name (regex)")
|
||||
|
||||
|
||||
class CreatorsModel(BaseSettingsModel):
|
||||
CreateLook: CreateLookModel = Field(
|
||||
default_factory=CreateLookModel,
|
||||
|
|
|
|||
|
|
@ -77,11 +77,12 @@ DEFAULT_MEL_WORKSPACE_SETTINGS = "\n".join((
|
|||
'workspace -fr "renderData" "renderData";',
|
||||
'workspace -fr "sourceImages" "sourceimages";',
|
||||
'workspace -fr "fileCache" "cache/nCache";',
|
||||
'workspace -fr "autoSave" "autosave";',
|
||||
'',
|
||||
))
|
||||
|
||||
DEFAULT_MAYA_SETTING = {
|
||||
"open_workfile_post_initialization": False,
|
||||
"open_workfile_post_initialization": True,
|
||||
"explicit_plugins_loading": DEFAULT_EXPLITCIT_PLUGINS_LOADING_SETTINGS,
|
||||
"imageio": DEFAULT_IMAGEIO_SETTINGS,
|
||||
"mel_workspace": DEFAULT_MEL_WORKSPACE_SETTINGS,
|
||||
|
|
|
|||
|
|
@ -433,6 +433,10 @@ class PublishersModel(BaseSettingsModel):
|
|||
default_factory=ValidateRenderSettingsModel,
|
||||
title="Validate Render Settings"
|
||||
)
|
||||
ValidateResolution: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Resolution Setting"
|
||||
)
|
||||
ValidateCurrentRenderLayerIsRenderable: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Current Render Layer Has Renderable Camera"
|
||||
|
|
@ -781,7 +785,7 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"sync_workfile_version": False
|
||||
},
|
||||
"CollectFbxAnimation": {
|
||||
"enabled": True
|
||||
"enabled": False
|
||||
},
|
||||
"CollectFbxCamera": {
|
||||
"enabled": False
|
||||
|
|
@ -858,7 +862,7 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
]
|
||||
},
|
||||
"ValidatePluginPathAttributes": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"optional": False,
|
||||
"active": True,
|
||||
"attribute": [
|
||||
|
|
@ -902,18 +906,23 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"redshift_render_attributes": [],
|
||||
"renderman_render_attributes": []
|
||||
},
|
||||
"ValidateResolution": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateCurrentRenderLayerIsRenderable": {
|
||||
"enabled": True,
|
||||
"optional": False,
|
||||
"active": True
|
||||
},
|
||||
"ValidateGLSLMaterial": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"optional": False,
|
||||
"active": True
|
||||
},
|
||||
"ValidateGLSLPlugin": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"optional": False,
|
||||
"active": True
|
||||
},
|
||||
|
|
@ -1145,7 +1154,7 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"active": True
|
||||
},
|
||||
"ExtractProxyAlembic": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"families": [
|
||||
"proxyAbc"
|
||||
]
|
||||
|
|
@ -1302,7 +1311,7 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"bake_attributes": "[]"
|
||||
},
|
||||
"ExtractGLB": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"active": True,
|
||||
"ogsfx_path": "/maya2glTF/PBR/shaders/glTF_PBR.ogsfx"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class ScriptsmenuModel(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_SCRIPTSMENU_SETTINGS = {
|
||||
"name": "OpenPype Tools",
|
||||
"name": "Custom Tools",
|
||||
"definition": [
|
||||
{
|
||||
"type": "action",
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ DEFAULT_WORKFILE_SETTING = {
|
|||
{
|
||||
"product_name_filters": [],
|
||||
"product_types": [
|
||||
"sedress"
|
||||
"setdress"
|
||||
],
|
||||
"repre_names": [
|
||||
"ma"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring addon version."""
|
||||
__version__ = "0.1.4"
|
||||
__version__ = "0.1.7"
|
||||
|
|
|
|||
|
|
@ -14,10 +14,30 @@ class NodesModel(BaseSettingsModel):
|
|||
default_factory=list,
|
||||
title="Used in plugins"
|
||||
)
|
||||
nukeNodeClass: str = Field(
|
||||
nuke_node_class: str = Field(
|
||||
title="Nuke Node Class",
|
||||
)
|
||||
|
||||
|
||||
class RequiredNodesModel(NodesModel):
|
||||
knobs: list[KnobModel] = Field(
|
||||
default_factory=list,
|
||||
title="Knobs",
|
||||
)
|
||||
|
||||
@validator("knobs")
|
||||
def ensure_unique_names(cls, value):
|
||||
"""Ensure name fields within the lists have unique names."""
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class OverrideNodesModel(NodesModel):
|
||||
subsets: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Subsets"
|
||||
)
|
||||
|
||||
knobs: list[KnobModel] = Field(
|
||||
default_factory=list,
|
||||
title="Knobs",
|
||||
|
|
@ -31,13 +51,11 @@ class NodesModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class NodesSetting(BaseSettingsModel):
|
||||
# TODO: rename `requiredNodes` to `required_nodes`
|
||||
requiredNodes: list[NodesModel] = Field(
|
||||
required_nodes: list[RequiredNodesModel] = Field(
|
||||
title="Plugin required",
|
||||
default_factory=list
|
||||
)
|
||||
# TODO: rename `overrideNodes` to `override_nodes`
|
||||
overrideNodes: list[NodesModel] = Field(
|
||||
override_nodes: list[OverrideNodesModel] = Field(
|
||||
title="Plugin's node overrides",
|
||||
default_factory=list
|
||||
)
|
||||
|
|
@ -46,38 +64,40 @@ class NodesSetting(BaseSettingsModel):
|
|||
def ocio_configs_switcher_enum():
|
||||
return [
|
||||
{"value": "nuke-default", "label": "nuke-default"},
|
||||
{"value": "spi-vfx", "label": "spi-vfx"},
|
||||
{"value": "spi-anim", "label": "spi-anim"},
|
||||
{"value": "aces_0.1.1", "label": "aces_0.1.1"},
|
||||
{"value": "aces_0.7.1", "label": "aces_0.7.1"},
|
||||
{"value": "aces_1.0.1", "label": "aces_1.0.1"},
|
||||
{"value": "aces_1.0.3", "label": "aces_1.0.3"},
|
||||
{"value": "aces_1.1", "label": "aces_1.1"},
|
||||
{"value": "aces_1.2", "label": "aces_1.2"},
|
||||
{"value": "aces_1.3", "label": "aces_1.3"},
|
||||
{"value": "custom", "label": "custom"}
|
||||
{"value": "spi-vfx", "label": "spi-vfx (11)"},
|
||||
{"value": "spi-anim", "label": "spi-anim (11)"},
|
||||
{"value": "aces_0.1.1", "label": "aces_0.1.1 (11)"},
|
||||
{"value": "aces_0.7.1", "label": "aces_0.7.1 (11)"},
|
||||
{"value": "aces_1.0.1", "label": "aces_1.0.1 (11)"},
|
||||
{"value": "aces_1.0.3", "label": "aces_1.0.3 (11, 12)"},
|
||||
{"value": "aces_1.1", "label": "aces_1.1 (12, 13)"},
|
||||
{"value": "aces_1.2", "label": "aces_1.2 (13, 14)"},
|
||||
{"value": "studio-config-v1.0.0_aces-v1.3_ocio-v2.1",
|
||||
"label": "studio-config-v1.0.0_aces-v1.3_ocio-v2.1 (14)"},
|
||||
{"value": "cg-config-v1.0.0_aces-v1.3_ocio-v2.1",
|
||||
"label": "cg-config-v1.0.0_aces-v1.3_ocio-v2.1 (14)"},
|
||||
]
|
||||
|
||||
|
||||
class WorkfileColorspaceSettings(BaseSettingsModel):
|
||||
"""Nuke workfile colorspace preset. """
|
||||
|
||||
colorManagement: Literal["Nuke", "OCIO"] = Field(
|
||||
title="Color Management"
|
||||
color_management: Literal["Nuke", "OCIO"] = Field(
|
||||
title="Color Management Workflow"
|
||||
)
|
||||
|
||||
OCIO_config: str = Field(
|
||||
title="OpenColorIO Config",
|
||||
description="Switch between OCIO configs",
|
||||
native_ocio_config: str = Field(
|
||||
title="Native OpenColorIO Config",
|
||||
description="Switch between native OCIO configs",
|
||||
enum_resolver=ocio_configs_switcher_enum,
|
||||
conditionalEnum=True
|
||||
)
|
||||
|
||||
workingSpaceLUT: str = Field(
|
||||
working_space: str = Field(
|
||||
title="Working Space"
|
||||
)
|
||||
monitorLut: str = Field(
|
||||
title="Monitor"
|
||||
thumbnail_space: str = Field(
|
||||
title="Thumbnail Space"
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -182,12 +202,10 @@ class ImageIOSettings(BaseSettingsModel):
|
|||
title="Nodes"
|
||||
)
|
||||
"""# TODO: enhance settings with host api:
|
||||
- [ ] old settings are using `regexInputs` key but we
|
||||
need to rename to `regex_inputs`
|
||||
- [ ] no need for `inputs` middle part. It can stay
|
||||
directly on `regex_inputs`
|
||||
"""
|
||||
regexInputs: RegexInputsModel = Field(
|
||||
regex_inputs: RegexInputsModel = Field(
|
||||
default_factory=RegexInputsModel,
|
||||
title="Assign colorspace to read nodes via rules"
|
||||
)
|
||||
|
|
@ -195,24 +213,24 @@ class ImageIOSettings(BaseSettingsModel):
|
|||
|
||||
DEFAULT_IMAGEIO_SETTINGS = {
|
||||
"viewer": {
|
||||
"viewerProcess": "sRGB"
|
||||
"viewerProcess": "sRGB (default)"
|
||||
},
|
||||
"baking": {
|
||||
"viewerProcess": "rec709"
|
||||
"viewerProcess": "rec709 (default)"
|
||||
},
|
||||
"workfile": {
|
||||
"colorManagement": "Nuke",
|
||||
"OCIO_config": "nuke-default",
|
||||
"workingSpaceLUT": "linear",
|
||||
"monitorLut": "sRGB",
|
||||
"color_management": "OCIO",
|
||||
"native_ocio_config": "nuke-default",
|
||||
"working_space": "scene_linear",
|
||||
"thumbnail_space": "sRGB (default)",
|
||||
},
|
||||
"nodes": {
|
||||
"requiredNodes": [
|
||||
"required_nodes": [
|
||||
{
|
||||
"plugins": [
|
||||
"CreateWriteRender"
|
||||
],
|
||||
"nukeNodeClass": "Write",
|
||||
"nuke_node_class": "Write",
|
||||
"knobs": [
|
||||
{
|
||||
"type": "text",
|
||||
|
|
@ -251,7 +269,7 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
{
|
||||
"type": "text",
|
||||
"name": "colorspace",
|
||||
"text": "linear"
|
||||
"text": "scene_linear"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
|
|
@ -264,7 +282,7 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
"plugins": [
|
||||
"CreateWritePrerender"
|
||||
],
|
||||
"nukeNodeClass": "Write",
|
||||
"nuke_node_class": "Write",
|
||||
"knobs": [
|
||||
{
|
||||
"type": "text",
|
||||
|
|
@ -303,7 +321,7 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
{
|
||||
"type": "text",
|
||||
"name": "colorspace",
|
||||
"text": "linear"
|
||||
"text": "scene_linear"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
|
|
@ -316,7 +334,7 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
"plugins": [
|
||||
"CreateWriteImage"
|
||||
],
|
||||
"nukeNodeClass": "Write",
|
||||
"nuke_node_class": "Write",
|
||||
"knobs": [
|
||||
{
|
||||
"type": "text",
|
||||
|
|
@ -350,7 +368,7 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
{
|
||||
"type": "text",
|
||||
"name": "colorspace",
|
||||
"text": "sRGB"
|
||||
"text": "texture_paint"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
|
|
@ -360,9 +378,9 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
]
|
||||
}
|
||||
],
|
||||
"overrideNodes": []
|
||||
"override_nodes": []
|
||||
},
|
||||
"regexInputs": {
|
||||
"regex_inputs": {
|
||||
"inputs": [
|
||||
{
|
||||
"regex": "(beauty).*(?=.exr)",
|
||||
|
|
|
|||
|
|
@ -51,17 +51,6 @@ class NodeModel(BaseSettingsModel):
|
|||
return value
|
||||
|
||||
|
||||
class ThumbnailRepositionNodeModel(BaseSettingsModel):
|
||||
node_class: str = Field(title="Node class")
|
||||
knobs: list[KnobModel] = Field(title="Knobs", default_factory=list)
|
||||
|
||||
@validator("knobs")
|
||||
def ensure_unique_names(cls, value):
|
||||
"""Ensure name fields within the lists have unique names."""
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class CollectInstanceDataModel(BaseSettingsModel):
|
||||
sync_workfile_version_on_product_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
|
|
@ -89,22 +78,6 @@ class ValidateKnobsModel(BaseSettingsModel):
|
|||
return validate_json_dict(value)
|
||||
|
||||
|
||||
class ExtractThumbnailModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
use_rendered: bool = Field(title="Use rendered images")
|
||||
bake_viewer_process: bool = Field(title="Bake view process")
|
||||
bake_viewer_input_process: bool = Field(title="Bake viewer input process")
|
||||
|
||||
nodes: list[NodeModel] = Field(
|
||||
default_factory=list,
|
||||
title="Nodes (deprecated)"
|
||||
)
|
||||
reposition_nodes: list[ThumbnailRepositionNodeModel] = Field(
|
||||
title="Reposition nodes",
|
||||
default_factory=list
|
||||
)
|
||||
|
||||
|
||||
class ExtractReviewDataModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
|
||||
|
|
@ -153,14 +126,29 @@ class IntermediateOutputModel(BaseSettingsModel):
|
|||
name: str = Field(title="Output name")
|
||||
filter: BakingStreamFilterModel = Field(
|
||||
title="Filter", default_factory=BakingStreamFilterModel)
|
||||
read_raw: bool = Field(title="Read raw switch")
|
||||
viewer_process_override: str = Field(title="Viewer process override")
|
||||
bake_viewer_process: bool = Field(title="Bake view process")
|
||||
bake_viewer_input_process: bool = Field(title="Bake viewer input process")
|
||||
read_raw: bool = Field(
|
||||
False,
|
||||
title="Read raw switch"
|
||||
)
|
||||
viewer_process_override: str = Field(
|
||||
"",
|
||||
title="Viewer process override"
|
||||
)
|
||||
bake_viewer_process: bool = Field(
|
||||
True,
|
||||
title="Bake viewer process"
|
||||
)
|
||||
bake_viewer_input_process: bool = Field(
|
||||
True,
|
||||
title="Bake viewer input process node (LUT)"
|
||||
)
|
||||
reformat_nodes_config: ReformatNodesConfigModel = Field(
|
||||
default_factory=ReformatNodesConfigModel,
|
||||
title="Reformat Nodes")
|
||||
extension: str = Field(title="File extension")
|
||||
extension: str = Field(
|
||||
"mov",
|
||||
title="File extension"
|
||||
)
|
||||
add_custom_tags: list[str] = Field(
|
||||
title="Custom tags", default_factory=list)
|
||||
|
||||
|
|
@ -236,7 +224,7 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
default_factory=CollectInstanceDataModel,
|
||||
section="Collectors"
|
||||
)
|
||||
ValidateCorrectAssetName: OptionalPluginModel = Field(
|
||||
ValidateCorrectAssetContext: OptionalPluginModel = Field(
|
||||
title="Validate Correct Folder Name",
|
||||
default_factory=OptionalPluginModel,
|
||||
section="Validators"
|
||||
|
|
@ -261,15 +249,10 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
title="Validate Backdrop",
|
||||
default_factory=OptionalPluginModel
|
||||
)
|
||||
ValidateScript: OptionalPluginModel = Field(
|
||||
title="Validate Script",
|
||||
ValidateScriptAttributes: OptionalPluginModel = Field(
|
||||
title="Validate workfile attributes",
|
||||
default_factory=OptionalPluginModel
|
||||
)
|
||||
ExtractThumbnail: ExtractThumbnailModel = Field(
|
||||
title="Extract Thumbnail",
|
||||
default_factory=ExtractThumbnailModel,
|
||||
section="Extractors"
|
||||
)
|
||||
ExtractReviewData: ExtractReviewDataModel = Field(
|
||||
title="Extract Review Data",
|
||||
default_factory=ExtractReviewDataModel
|
||||
|
|
@ -308,7 +291,7 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
"write"
|
||||
]
|
||||
},
|
||||
"ValidateCorrectAssetName": {
|
||||
"ValidateCorrectAssetContext": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
|
|
@ -343,83 +326,11 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateScript": {
|
||||
"ValidateScriptAttributes": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ExtractThumbnail": {
|
||||
"enabled": True,
|
||||
"use_rendered": True,
|
||||
"bake_viewer_process": True,
|
||||
"bake_viewer_input_process": True,
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Reformat01",
|
||||
"nodeclass": "Reformat",
|
||||
"dependency": "",
|
||||
"knobs": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "type",
|
||||
"text": "to format"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "format",
|
||||
"text": "HD_1080"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "filter",
|
||||
"text": "Lanczos6"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "black_outside",
|
||||
"boolean": True
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "pbb",
|
||||
"boolean": False
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"reposition_nodes": [
|
||||
{
|
||||
"node_class": "Reformat",
|
||||
"knobs": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "type",
|
||||
"text": "to format"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "format",
|
||||
"text": "HD_1080"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "filter",
|
||||
"text": "Lanczos6"
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"name": "black_outside",
|
||||
"boolean": True
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"name": "pbb",
|
||||
"boolean": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ExtractReviewData": {
|
||||
"enabled": False
|
||||
},
|
||||
|
|
@ -427,7 +338,7 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
"enabled": False
|
||||
},
|
||||
"ExtractReviewDataMov": {
|
||||
"enabled": True,
|
||||
"enabled": False,
|
||||
"viewer_lut_raw": False,
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -463,12 +374,12 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
"text": "Lanczos6"
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"type": "boolean",
|
||||
"name": "black_outside",
|
||||
"boolean": True
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"type": "boolean",
|
||||
"name": "pbb",
|
||||
"boolean": False
|
||||
}
|
||||
|
|
@ -518,12 +429,12 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
"text": "Lanczos6"
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"type": "boolean",
|
||||
"name": "black_outside",
|
||||
"boolean": True
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"type": "boolean",
|
||||
"name": "pbb",
|
||||
"boolean": False
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,27 +26,27 @@ class ScriptsmenuSettings(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_SCRIPTSMENU_SETTINGS = {
|
||||
"name": "OpenPype Tools",
|
||||
"name": "Custom Tools",
|
||||
"definition": [
|
||||
{
|
||||
"type": "action",
|
||||
"sourcetype": "python",
|
||||
"title": "OpenPype Docs",
|
||||
"command": "import webbrowser;webbrowser.open(url='https://openpype.io/docs/artist_hosts_nuke_tut')",
|
||||
"tooltip": "Open the OpenPype Nuke user doc page"
|
||||
"title": "Ayon Nuke Docs",
|
||||
"command": "import webbrowser;webbrowser.open(url='https://ayon.ynput.io/docs/addon_nuke_artist')", # noqa
|
||||
"tooltip": "Open the Ayon Nuke user doc page"
|
||||
},
|
||||
{
|
||||
"type": "action",
|
||||
"sourcetype": "python",
|
||||
"title": "Set Frame Start (Read Node)",
|
||||
"command": "from openpype.hosts.nuke.startup.frame_setting_for_read_nodes import main;main();",
|
||||
"command": "from openpype.hosts.nuke.startup.frame_setting_for_read_nodes import main;main();", # noqa
|
||||
"tooltip": "Set frame start for read node(s)"
|
||||
},
|
||||
{
|
||||
"type": "action",
|
||||
"sourcetype": "python",
|
||||
"title": "Set non publish output for Write Node",
|
||||
"command": "from openpype.hosts.nuke.startup.custom_write_node import main;main();",
|
||||
"command": "from openpype.hosts.nuke.startup.custom_write_node import main;main();", # noqa
|
||||
"tooltip": "Open the OpenPype Nuke user doc page"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.4"
|
||||
__version__ = "0.1.8"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ aiohttp_json_rpc = "*" # TVPaint server
|
|||
aiohttp-middlewares = "^2.0.0"
|
||||
wsrpc_aiohttp = "^3.1.1" # websocket server
|
||||
clique = "1.6.*"
|
||||
shotgun_api3 = {git = "https://github.com/shotgunsoftware/python-api.git", rev = "v3.3.3"}
|
||||
gazu = "^0.9.3"
|
||||
google-api-python-client = "^1.12.8" # sync server google support (should be separate?)
|
||||
jsonschema = "^2.6.0"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class ColorCodeMappings(BaseSettingsModel):
|
|||
)
|
||||
|
||||
layer_name_regex: list[str] = Field(
|
||||
"",
|
||||
default_factory=list,
|
||||
title="Layer name regex"
|
||||
)
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ class PhotoshopPublishPlugins(BaseSettingsModel):
|
|||
)
|
||||
|
||||
CollectVersion: CollectVersionPlugin = Field(
|
||||
title="Create Image",
|
||||
title="Collect Version",
|
||||
default_factory=CollectVersionPlugin,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,18 @@
|
|||
from pydantic import Field
|
||||
from pathlib import Path
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
class PathsTemplate(BaseSettingsModel):
|
||||
windows: Path = Field(
|
||||
'',
|
||||
title="Windows"
|
||||
)
|
||||
darwin: Path = Field(
|
||||
'',
|
||||
title="MacOS"
|
||||
)
|
||||
linux: Path = Field(
|
||||
'',
|
||||
title="Linux"
|
||||
)
|
||||
from ayon_server.settings import BaseSettingsModel, MultiplatformPathModel
|
||||
|
||||
|
||||
class CustomBuilderTemplate(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
task_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Task types",
|
||||
)
|
||||
template_path: PathsTemplate = Field(
|
||||
default_factory=PathsTemplate
|
||||
|
||||
path: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Template path"
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -37,5 +24,6 @@ class WorkfileBuilderPlugin(BaseSettingsModel):
|
|||
)
|
||||
|
||||
custom_templates: list[CustomBuilderTemplate] = Field(
|
||||
default_factory=CustomBuilderTemplate
|
||||
default_factory=CustomBuilderTemplate,
|
||||
title="Template profiles"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring addon version."""
|
||||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.1"
|
||||
|
|
|
|||
17
server_addon/substancepainter/server/__init__.py
Normal file
17
server_addon/substancepainter/server/__init__.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from typing import Type
|
||||
|
||||
from ayon_server.addons import BaseServerAddon
|
||||
|
||||
from .version import __version__
|
||||
from .settings import SubstancePainterSettings, DEFAULT_SPAINTER_SETTINGS
|
||||
|
||||
|
||||
class SubstancePainterAddon(BaseServerAddon):
|
||||
name = "substancepainter"
|
||||
title = "Substance Painter"
|
||||
version = __version__
|
||||
settings_model: Type[SubstancePainterSettings] = SubstancePainterSettings
|
||||
|
||||
async def get_default_settings(self):
|
||||
settings_model_cls = self.get_settings_model()
|
||||
return settings_model_cls(**DEFAULT_SPAINTER_SETTINGS)
|
||||
10
server_addon/substancepainter/server/settings/__init__.py
Normal file
10
server_addon/substancepainter/server/settings/__init__.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from .main import (
|
||||
SubstancePainterSettings,
|
||||
DEFAULT_SPAINTER_SETTINGS,
|
||||
)
|
||||
|
||||
|
||||
__all__ = (
|
||||
"SubstancePainterSettings",
|
||||
"DEFAULT_SPAINTER_SETTINGS",
|
||||
)
|
||||
61
server_addon/substancepainter/server/settings/imageio.py
Normal file
61
server_addon/substancepainter/server/settings/imageio.py
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
from pydantic import Field, validator
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings.validators import ensure_unique_names
|
||||
|
||||
|
||||
class ImageIOConfigModel(BaseSettingsModel):
|
||||
override_global_config: bool = Field(
|
||||
False,
|
||||
title="Override global OCIO config"
|
||||
)
|
||||
filepath: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Config path"
|
||||
)
|
||||
|
||||
|
||||
class ImageIOFileRuleModel(BaseSettingsModel):
|
||||
name: str = Field("", title="Rule name")
|
||||
pattern: str = Field("", title="Regex pattern")
|
||||
colorspace: str = Field("", title="Colorspace name")
|
||||
ext: str = Field("", title="File extension")
|
||||
|
||||
|
||||
class ImageIOFileRulesModel(BaseSettingsModel):
|
||||
activate_host_rules: bool = Field(False)
|
||||
rules: list[ImageIOFileRuleModel] = Field(
|
||||
default_factory=list,
|
||||
title="Rules"
|
||||
)
|
||||
|
||||
@validator("rules")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class ImageIOSettings(BaseSettingsModel):
|
||||
activate_host_color_management: bool = Field(
|
||||
True, title="Enable Color Management"
|
||||
)
|
||||
ocio_config: ImageIOConfigModel = Field(
|
||||
default_factory=ImageIOConfigModel,
|
||||
title="OCIO config"
|
||||
)
|
||||
file_rules: ImageIOFileRulesModel = Field(
|
||||
default_factory=ImageIOFileRulesModel,
|
||||
title="File Rules"
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_IMAGEIO_SETTINGS = {
|
||||
"activate_host_color_management": True,
|
||||
"ocio_config": {
|
||||
"override_global_config": False,
|
||||
"filepath": []
|
||||
},
|
||||
"file_rules": {
|
||||
"activate_host_rules": False,
|
||||
"rules": []
|
||||
}
|
||||
}
|
||||
26
server_addon/substancepainter/server/settings/main.py
Normal file
26
server_addon/substancepainter/server/settings/main.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from .imageio import ImageIOSettings, DEFAULT_IMAGEIO_SETTINGS
|
||||
|
||||
|
||||
class ShelvesSettingsModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: str = Field(title="Path")
|
||||
|
||||
|
||||
class SubstancePainterSettings(BaseSettingsModel):
|
||||
imageio: ImageIOSettings = Field(
|
||||
default_factory=ImageIOSettings,
|
||||
title="Color Management (ImageIO)"
|
||||
)
|
||||
shelves: list[ShelvesSettingsModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelves"
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_SPAINTER_SETTINGS = {
|
||||
"imageio": DEFAULT_IMAGEIO_SETTINGS,
|
||||
"shelves": []
|
||||
}
|
||||
1
server_addon/substancepainter/server/version.py
Normal file
1
server_addon/substancepainter/server/version.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
__version__ = "0.1.0"
|
||||
|
|
@ -5,19 +5,17 @@ from ayon_server.settings import BaseSettingsModel, task_types_enum
|
|||
|
||||
class ClipNameTokenizerItem(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
# TODO was 'dict-modifiable', is list of dicts now, must be fixed in code
|
||||
name: str = Field("#TODO", title="Tokenizer name")
|
||||
name: str = Field("", title="Tokenizer name")
|
||||
regex: str = Field("", title="Tokenizer regex")
|
||||
|
||||
|
||||
class ShotAddTasksItem(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
# TODO was 'dict-modifiable', is list of dicts now, must be fixed in code
|
||||
name: str = Field('', title="Key")
|
||||
task_type: list[str] = Field(
|
||||
task_type: str = Field(
|
||||
title="Task type",
|
||||
default_factory=list,
|
||||
enum_resolver=task_types_enum)
|
||||
enum_resolver=task_types_enum
|
||||
)
|
||||
|
||||
|
||||
class ShotRenameSubmodel(BaseSettingsModel):
|
||||
|
|
@ -54,7 +52,7 @@ class TokenToParentConvertorItem(BaseSettingsModel):
|
|||
)
|
||||
|
||||
|
||||
class ShotHierchySubmodel(BaseSettingsModel):
|
||||
class ShotHierarchySubmodel(BaseSettingsModel):
|
||||
enabled: bool = True
|
||||
parents_path: str = Field(
|
||||
"",
|
||||
|
|
@ -102,9 +100,9 @@ class EditorialSimpleCreatorPlugin(BaseSettingsModel):
|
|||
title="Shot Rename",
|
||||
default_factory=ShotRenameSubmodel
|
||||
)
|
||||
shot_hierarchy: ShotHierchySubmodel = Field(
|
||||
shot_hierarchy: ShotHierarchySubmodel = Field(
|
||||
title="Shot Hierarchy",
|
||||
default_factory=ShotHierchySubmodel
|
||||
default_factory=ShotHierarchySubmodel
|
||||
)
|
||||
shot_add_tasks: list[ShotAddTasksItem] = Field(
|
||||
title="Add tasks to shot",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring addon version."""
|
||||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.3"
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@ class UnrealSettings(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_VALUES = {
|
||||
"level_sequences_for_layouts": False,
|
||||
"level_sequences_for_layouts": True,
|
||||
"delete_unmatched_assets": False,
|
||||
"render_config_path": "",
|
||||
"preroll_frames": 0,
|
||||
"render_format": "png",
|
||||
"render_format": "exr",
|
||||
"project_setup": {
|
||||
"dev_mode": False
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue