mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Renamed ProfileConfig to ThumbnailDef
This commit is contained in:
parent
d859ea2fc3
commit
f1288eb096
1 changed files with 5 additions and 5 deletions
|
|
@ -30,7 +30,7 @@ from ayon_core.lib.transcoding import VIDEO_EXTENSIONS, IMAGE_EXTENSIONS
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ProfileConfig:
|
class ThumbnailDef:
|
||||||
"""
|
"""
|
||||||
Data class representing the full configuration for selected profile
|
Data class representing the full configuration for selected profile
|
||||||
|
|
||||||
|
|
@ -65,9 +65,9 @@ class ProfileConfig:
|
||||||
background_color: Tuple[int, int, int, float] = (0, 0, 0, 0.0)
|
background_color: Tuple[int, int, int, float] = (0, 0, 0, 0.0)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, data: Dict[str, Any]) -> "ProfileConfig":
|
def from_dict(cls, data: Dict[str, Any]) -> "ThumbnailDef":
|
||||||
"""
|
"""
|
||||||
Creates a ProfileConfig instance from a dictionary, safely ignoring
|
Creates a ThumbnailDef instance from a dictionary, safely ignoring
|
||||||
any keys in the dictionary that are not fields in the dataclass.
|
any keys in the dictionary that are not fields in the dataclass.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -746,7 +746,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
||||||
def _get_config_from_profile(
|
def _get_config_from_profile(
|
||||||
self,
|
self,
|
||||||
instance: pyblish.api.Instance
|
instance: pyblish.api.Instance
|
||||||
) -> Optional[ProfileConfig]:
|
) -> Optional[ThumbnailDef]:
|
||||||
"""Returns profile if and how repre should be color transcoded."""
|
"""Returns profile if and how repre should be color transcoded."""
|
||||||
host_name = instance.context.data["hostName"]
|
host_name = instance.context.data["hostName"]
|
||||||
product_type = instance.data["productType"]
|
product_type = instance.data["productType"]
|
||||||
|
|
@ -778,4 +778,4 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
return ProfileConfig.from_dict(profile)
|
return ThumbnailDef.from_dict(profile)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue