mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Typing
This commit is contained in:
parent
d9344239dd
commit
a426baf1a1
1 changed files with 8 additions and 8 deletions
|
|
@ -15,7 +15,7 @@ Todos:
|
||||||
import os
|
import os
|
||||||
from dataclasses import dataclass, field, fields
|
from dataclasses import dataclass, field, fields
|
||||||
import tempfile
|
import tempfile
|
||||||
from typing import Dict, Any, List, Tuple
|
from typing import Dict, Any, List, Tuple, Optional
|
||||||
|
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
from ayon_core.lib import (
|
from ayon_core.lib import (
|
||||||
|
|
@ -88,7 +88,7 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
|
||||||
# Settings
|
# Settings
|
||||||
profiles = None
|
profiles = None
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance: pyblish.api.Instance):
|
||||||
if not self.profiles:
|
if not self.profiles:
|
||||||
self.log.debug("No profiles present for color transcode")
|
self.log.debug("No profiles present for color transcode")
|
||||||
return
|
return
|
||||||
|
|
@ -144,7 +144,7 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
|
||||||
context: pyblish.api.Context,
|
context: pyblish.api.Context,
|
||||||
thumbnail_source: str,
|
thumbnail_source: str,
|
||||||
profile_config: ProfileConfig
|
profile_config: ProfileConfig
|
||||||
) -> str:
|
) -> Optional[str]:
|
||||||
if not thumbnail_source:
|
if not thumbnail_source:
|
||||||
self.log.debug("Thumbnail source not filled. Skipping.")
|
self.log.debug("Thumbnail source not filled. Skipping.")
|
||||||
return
|
return
|
||||||
|
|
@ -285,7 +285,7 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
|
||||||
self,
|
self,
|
||||||
context: pyblish.api.Context,
|
context: pyblish.api.Context,
|
||||||
profile: ProfileConfig
|
profile: ProfileConfig
|
||||||
) -> str:
|
) -> Optional[str]:
|
||||||
hasContextThumbnail = "thumbnailPath" in context.data
|
hasContextThumbnail = "thumbnailPath" in context.data
|
||||||
if hasContextThumbnail:
|
if hasContextThumbnail:
|
||||||
return
|
return
|
||||||
|
|
@ -335,10 +335,10 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
|
||||||
|
|
||||||
def _get_resolution_arg(
|
def _get_resolution_arg(
|
||||||
self,
|
self,
|
||||||
application,
|
application: str,
|
||||||
input_path,
|
input_path: str,
|
||||||
profile
|
profile: ProfileConfig
|
||||||
):
|
) -> List[str]:
|
||||||
# get settings
|
# get settings
|
||||||
if profile.target_size["type"] == "source":
|
if profile.target_size["type"] == "source":
|
||||||
return []
|
return []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue