# Released under the MIT License. See LICENSE for details.#"""Public types for assets-v1 workspaces.These types may only be used server-side, but they are exposed herefor reference when setting workspace config data by hand or for usein client-side workspace modification tools. There may be advancedsettings that are not accessible through the UI/etc."""from__future__importannotationsfromenumimportEnumfromdataclassesimportdataclassfromtypingimportTYPE_CHECKING,Annotated,override,assert_neverfromefro.dataclassioimportioprepped,IOAttrs,IOMultiTypeifTYPE_CHECKING:pass
[docs]@ioprepped@dataclassclassAssetsV1GlobalVals:"""Global values for an assets_v1 workspace."""base_assets:Annotated[str|None,IOAttrs('base_assets',store_default=False)]=Nonebase_assets_filter:Annotated[str,IOAttrs('base_assets_filter',store_default=False)]=''
[docs]classAssetsV1PathValsTypeID(Enum):"""Types of vals we can store for paths."""TEX_V1='tex_v1'
[docs]classAssetsV1PathVals(IOMultiType[AssetsV1PathValsTypeID]):"""Top level class for path vals classes."""
[docs]@override@classmethoddefget_type_id(cls)->AssetsV1PathValsTypeID:# Require child classes to supply this themselves. If we# did a full type registry/lookup here it would require us# to import everything and would prevent lazy loading.raiseNotImplementedError()
[docs]@override@classmethoddefget_type(cls,type_id:AssetsV1PathValsTypeID)->type[AssetsV1PathVals]:# pylint: disable=cyclic-importout:type[AssetsV1PathVals]t=AssetsV1PathValsTypeIDiftype_idist.TEX_V1:out=AssetsV1PathValsTexV1else:# Important to make sure we provide all types.assert_never(type_id)returnout
[docs]@ioprepped@dataclassclassAssetsV1PathValsTexV1(AssetsV1PathVals):"""Path-specific values for an assets_v1 workspace path."""
[docs]classTextureQuality(Enum):"""Quality settings for our textures."""LOW='low'MEDIUM='medium'HIGH='high'
# Just dummy testing values for now.texture_quality:Annotated[TextureQuality,IOAttrs('texture_quality',store_default=False)]=TextureQuality.MEDIUM