mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
blender can use AYON settings
This commit is contained in:
parent
53df65a412
commit
00e2bebd12
3 changed files with 10 additions and 11 deletions
|
|
@ -1,9 +1,11 @@
|
|||
import os
|
||||
import json
|
||||
|
||||
import clique
|
||||
import pyblish.api
|
||||
|
||||
import bpy
|
||||
|
||||
import pyblish.api
|
||||
from ayon_core.pipeline import publish
|
||||
from ayon_core.hosts.blender.api import capture
|
||||
from ayon_core.hosts.blender.api.lib import maintained_time
|
||||
|
|
@ -23,6 +25,8 @@ class ExtractPlayblast(publish.Extractor, publish.OptionalPyblishPluginMixin):
|
|||
optional = True
|
||||
order = pyblish.api.ExtractorOrder + 0.01
|
||||
|
||||
presets = "{}"
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
return
|
||||
|
|
@ -59,8 +63,7 @@ class ExtractPlayblast(publish.Extractor, publish.OptionalPyblishPluginMixin):
|
|||
|
||||
self.log.debug(f"Outputting images to {path}")
|
||||
|
||||
project_settings = instance.context.data["project_settings"]["blender"]
|
||||
presets = project_settings["publish"]["ExtractPlayblast"]["presets"]
|
||||
presets = json.loads(self.presets)
|
||||
preset = presets.get("default")
|
||||
preset.update({
|
||||
"camera": camera,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import glob
|
||||
import json
|
||||
|
||||
import pyblish.api
|
||||
from ayon_core.pipeline import publish
|
||||
|
|
@ -21,7 +22,7 @@ class ExtractThumbnail(publish.Extractor):
|
|||
hosts = ["blender"]
|
||||
families = ["review"]
|
||||
order = pyblish.api.ExtractorOrder + 0.01
|
||||
presets = {}
|
||||
presets = "{}"
|
||||
|
||||
def process(self, instance):
|
||||
self.log.debug("Extracting capture..")
|
||||
|
|
@ -44,7 +45,8 @@ class ExtractThumbnail(publish.Extractor):
|
|||
family = instance.data.get("family")
|
||||
isolate = instance.data("isolate", None)
|
||||
|
||||
preset = self.presets.get(family, {})
|
||||
presets = json.loads(self.presets)
|
||||
preset = presets.get(family, {})
|
||||
|
||||
preset.update({
|
||||
"camera": camera,
|
||||
|
|
|
|||
|
|
@ -248,12 +248,6 @@ def _convert_blender_project_settings(ayon_settings, output):
|
|||
ayon_blender = ayon_settings["blender"]
|
||||
_convert_host_imageio(ayon_blender)
|
||||
|
||||
ayon_publish = ayon_blender["publish"]
|
||||
|
||||
for plugin in ("ExtractThumbnail", "ExtractPlayblast"):
|
||||
plugin_settings = ayon_publish[plugin]
|
||||
plugin_settings["presets"] = json.loads(plugin_settings["presets"])
|
||||
|
||||
output["blender"] = ayon_blender
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue