mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge branch 'develop' into bugfix/AY-1433_Nuke-Render-Use-existing-frames-with-slate-offsets-the-published-render
This commit is contained in:
commit
aadc465eaa
4 changed files with 24 additions and 7 deletions
|
|
@ -13,6 +13,9 @@ class ExtractBlend(publish.Extractor, publish.OptionalPyblishPluginMixin):
|
||||||
families = ["model", "camera", "rig", "action", "layout", "blendScene"]
|
families = ["model", "camera", "rig", "action", "layout", "blendScene"]
|
||||||
optional = True
|
optional = True
|
||||||
|
|
||||||
|
# From settings
|
||||||
|
compress = False
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
if not self.is_active(instance.data):
|
if not self.is_active(instance.data):
|
||||||
return
|
return
|
||||||
|
|
@ -53,7 +56,7 @@ class ExtractBlend(publish.Extractor, publish.OptionalPyblishPluginMixin):
|
||||||
if node.image and node.image.packed_file is None:
|
if node.image and node.image.packed_file is None:
|
||||||
node.image.pack()
|
node.image.pack()
|
||||||
|
|
||||||
bpy.data.libraries.write(filepath, data_blocks)
|
bpy.data.libraries.write(filepath, data_blocks, compress=self.compress)
|
||||||
|
|
||||||
if "representations" not in instance.data:
|
if "representations" not in instance.data:
|
||||||
instance.data["representations"] = []
|
instance.data["representations"] = []
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ class ExtractBlendAnimation(
|
||||||
families = ["animation"]
|
families = ["animation"]
|
||||||
optional = True
|
optional = True
|
||||||
|
|
||||||
|
# From settings
|
||||||
|
compress = False
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
if not self.is_active(instance.data):
|
if not self.is_active(instance.data):
|
||||||
return
|
return
|
||||||
|
|
@ -46,7 +49,7 @@ class ExtractBlendAnimation(
|
||||||
data_blocks.add(child.animation_data.action)
|
data_blocks.add(child.animation_data.action)
|
||||||
data_blocks.add(obj)
|
data_blocks.add(obj)
|
||||||
|
|
||||||
bpy.data.libraries.write(filepath, data_blocks)
|
bpy.data.libraries.write(filepath, data_blocks, compress=self.compress)
|
||||||
|
|
||||||
if "representations" not in instance.data:
|
if "representations" not in instance.data:
|
||||||
instance.data["representations"] = []
|
instance.data["representations"] = []
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,14 @@ class ExtractBlendModel(BaseSettingsModel):
|
||||||
default_factory=list,
|
default_factory=list,
|
||||||
title="Families"
|
title="Families"
|
||||||
)
|
)
|
||||||
|
compress: bool = SettingsField(True, title="Compress")
|
||||||
|
|
||||||
|
|
||||||
|
class ExtractBlendAnimationModel(BaseSettingsModel):
|
||||||
|
enabled: bool = SettingsField(True)
|
||||||
|
optional: bool = SettingsField(title="Optional")
|
||||||
|
active: bool = SettingsField(title="Active")
|
||||||
|
compress: bool = SettingsField(False, title="Compress")
|
||||||
|
|
||||||
|
|
||||||
class ExtractPlayblastModel(BaseSettingsModel):
|
class ExtractPlayblastModel(BaseSettingsModel):
|
||||||
|
|
@ -51,6 +59,7 @@ class ExtractPlayblastModel(BaseSettingsModel):
|
||||||
optional: bool = SettingsField(title="Optional")
|
optional: bool = SettingsField(title="Optional")
|
||||||
active: bool = SettingsField(title="Active")
|
active: bool = SettingsField(title="Active")
|
||||||
presets: str = SettingsField("", title="Presets", widget="textarea")
|
presets: str = SettingsField("", title="Presets", widget="textarea")
|
||||||
|
compress: bool = SettingsField(False, title="Compress")
|
||||||
|
|
||||||
@validator("presets")
|
@validator("presets")
|
||||||
def validate_json(cls, value):
|
def validate_json(cls, value):
|
||||||
|
|
@ -110,8 +119,8 @@ class PublishPuginsModel(BaseSettingsModel):
|
||||||
default_factory=ValidatePluginModel,
|
default_factory=ValidatePluginModel,
|
||||||
title="Extract ABC"
|
title="Extract ABC"
|
||||||
)
|
)
|
||||||
ExtractBlendAnimation: ValidatePluginModel = SettingsField(
|
ExtractBlendAnimation: ExtractBlendAnimationModel = SettingsField(
|
||||||
default_factory=ValidatePluginModel,
|
default_factory=ExtractBlendAnimationModel,
|
||||||
title="Extract Blend Animation"
|
title="Extract Blend Animation"
|
||||||
)
|
)
|
||||||
ExtractAnimationFBX: ValidatePluginModel = SettingsField(
|
ExtractAnimationFBX: ValidatePluginModel = SettingsField(
|
||||||
|
|
@ -198,7 +207,8 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
||||||
"action",
|
"action",
|
||||||
"layout",
|
"layout",
|
||||||
"blendScene"
|
"blendScene"
|
||||||
]
|
],
|
||||||
|
"compress": False
|
||||||
},
|
},
|
||||||
"ExtractFBX": {
|
"ExtractFBX": {
|
||||||
"enabled": False,
|
"enabled": False,
|
||||||
|
|
@ -213,7 +223,8 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
||||||
"ExtractBlendAnimation": {
|
"ExtractBlendAnimation": {
|
||||||
"enabled": True,
|
"enabled": True,
|
||||||
"optional": True,
|
"optional": True,
|
||||||
"active": True
|
"active": True,
|
||||||
|
"compress": False
|
||||||
},
|
},
|
||||||
"ExtractAnimationFBX": {
|
"ExtractAnimationFBX": {
|
||||||
"enabled": False,
|
"enabled": False,
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.1.6"
|
__version__ = "0.1.7"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue