mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
make sure the texture can be reloaded
This commit is contained in:
parent
cafd02a851
commit
cbc4c67922
3 changed files with 15 additions and 15 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import os
|
||||
import pyblish.api
|
||||
from openpype.pipeline import publish, OptionalPyblishPluginMixin
|
||||
from openpype.pipeline import publish
|
||||
from openpype.hosts.max.api.preview_animation import render_preview_animation
|
||||
|
||||
|
||||
class ExtractThumbnail(publish.Extractor, OptionalPyblishPluginMixin):
|
||||
class ExtractThumbnail(publish.Extractor):
|
||||
"""Extract Thumbnail for Review
|
||||
"""
|
||||
|
||||
|
|
@ -15,8 +15,6 @@ class ExtractThumbnail(publish.Extractor, OptionalPyblishPluginMixin):
|
|||
optional = True
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
return
|
||||
ext = instance.data.get("imageFormat")
|
||||
frame = int(instance.data["frameStart"])
|
||||
staging_dir = self.staging_dir(instance)
|
||||
|
|
|
|||
|
|
@ -43,11 +43,12 @@ class ExtractPlayblast(publish.Extractor):
|
|||
json.dumps(preset, indent=4, sort_keys=True)
|
||||
)
|
||||
)
|
||||
if (
|
||||
preset["viewport_options"].get("reloadTextures")
|
||||
and preset["viewport_options"].get("textures")
|
||||
):
|
||||
lib.reload_textures()
|
||||
if "textures" in preset["viewport_options"]:
|
||||
if "reloadTextures" in preset["viewport_options"]:
|
||||
lib.reload_textures()
|
||||
else:
|
||||
self.log.debug(
|
||||
"Reload Textures during playblasting is disabled.")
|
||||
preset.pop("reloadTextures", None) # not supported by `capture`
|
||||
path = capture.capture(log=self.log, **preset)
|
||||
self.log.debug("playblast path {}".format(path))
|
||||
|
|
|
|||
|
|
@ -152,12 +152,13 @@ class ExtractThumbnail(publish.Extractor):
|
|||
json.dumps(preset, indent=4, sort_keys=True)
|
||||
)
|
||||
)
|
||||
if (
|
||||
preset["viewport_options"].get("reloadTextures")
|
||||
and preset["viewport_options"].get("textures")
|
||||
):
|
||||
lib.reload_textures()
|
||||
preset.pop("reloadTextures", None) # not supported by `capture`
|
||||
if "textures" in preset["viewport_options"]:
|
||||
if "reloadTextures" in preset["viewport_options"]:
|
||||
lib.reload_textures()
|
||||
else:
|
||||
self.log.debug(
|
||||
"Reload Textures during playblasting is disabled.")
|
||||
preset.pop("reloadTextures", None)
|
||||
path = capture.capture(**preset)
|
||||
playblast = self._fix_playblast_output_path(path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue