mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'develop' into enhancement/maya_collect_render_fix
This commit is contained in:
commit
5ea4a70dd9
7 changed files with 60 additions and 23 deletions
|
|
@ -307,10 +307,6 @@ def on_save():
|
||||||
# update houdini vars
|
# update houdini vars
|
||||||
lib.update_houdini_vars_context_dialog()
|
lib.update_houdini_vars_context_dialog()
|
||||||
|
|
||||||
nodes = lib.get_id_required_nodes()
|
|
||||||
for node, new_id in lib.generate_ids(nodes):
|
|
||||||
lib.set_id(node, new_id, overwrite=False)
|
|
||||||
|
|
||||||
# We are now starting the actual save directly
|
# We are now starting the actual save directly
|
||||||
global ABOUT_TO_SAVE
|
global ABOUT_TO_SAVE
|
||||||
ABOUT_TO_SAVE = False
|
ABOUT_TO_SAVE = False
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,10 @@ from __future__ import absolute_import
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
import ayon_api
|
import ayon_api
|
||||||
|
|
||||||
from ayon_core.pipeline.publish import get_errored_instances_from_context
|
from ayon_core.pipeline.publish import (
|
||||||
|
get_errored_instances_from_context,
|
||||||
|
get_errored_plugins_from_context
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class GenerateUUIDsOnInvalidAction(pyblish.api.Action):
|
class GenerateUUIDsOnInvalidAction(pyblish.api.Action):
|
||||||
|
|
@ -112,12 +115,17 @@ class SelectInvalidAction(pyblish.api.Action):
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError("Current host is not Maya")
|
raise ImportError("Current host is not Maya")
|
||||||
|
|
||||||
errored_instances = get_errored_instances_from_context(context,
|
|
||||||
plugin=plugin)
|
|
||||||
|
|
||||||
# Get the invalid nodes for the plug-ins
|
# Get the invalid nodes for the plug-ins
|
||||||
self.log.info("Finding invalid nodes..")
|
self.log.info("Finding invalid nodes..")
|
||||||
invalid = list()
|
invalid = list()
|
||||||
|
if issubclass(plugin, pyblish.api.ContextPlugin):
|
||||||
|
errored_plugins = get_errored_plugins_from_context(context)
|
||||||
|
if plugin in errored_plugins:
|
||||||
|
invalid = plugin.get_invalid(context)
|
||||||
|
else:
|
||||||
|
errored_instances = get_errored_instances_from_context(
|
||||||
|
context, plugin=plugin
|
||||||
|
)
|
||||||
for instance in errored_instances:
|
for instance in errored_instances:
|
||||||
invalid_nodes = plugin.get_invalid(instance)
|
invalid_nodes = plugin.get_invalid(instance)
|
||||||
if invalid_nodes:
|
if invalid_nodes:
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,9 @@ def override_toolbox_ui():
|
||||||
annotation="Look Manager",
|
annotation="Look Manager",
|
||||||
label="Look Manager",
|
label="Look Manager",
|
||||||
image=os.path.join(icons, "lookmanager.png"),
|
image=os.path.join(icons, "lookmanager.png"),
|
||||||
command=show_look_assigner,
|
command=lambda: show_look_assigner(
|
||||||
|
parent=parent_widget
|
||||||
|
),
|
||||||
width=icon_size,
|
width=icon_size,
|
||||||
height=icon_size,
|
height=icon_size,
|
||||||
parent=parent
|
parent=parent
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ from maya import cmds
|
||||||
from ayon_core.pipeline import publish
|
from ayon_core.pipeline import publish
|
||||||
|
|
||||||
|
|
||||||
class ExtractGPUCache(publish.Extractor):
|
class ExtractGPUCache(publish.Extractor,
|
||||||
|
publish.OptionalPyblishPluginMixin):
|
||||||
"""Extract the content of the instance to a GPU cache file."""
|
"""Extract the content of the instance to a GPU cache file."""
|
||||||
|
|
||||||
label = "GPU Cache"
|
label = "GPU Cache"
|
||||||
|
|
@ -20,6 +21,9 @@ class ExtractGPUCache(publish.Extractor):
|
||||||
useBaseTessellation = True
|
useBaseTessellation = True
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
|
if not self.is_active(instance.data):
|
||||||
|
return
|
||||||
|
|
||||||
cmds.loadPlugin("gpuCache", quiet=True)
|
cmds.loadPlugin("gpuCache", quiet=True)
|
||||||
|
|
||||||
staging_dir = self.staging_dir(instance)
|
staging_dir = self.staging_dir(instance)
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,18 @@ class ValidateShadingEngine(pyblish.api.InstancePlugin,
|
||||||
shape, destination=True, type="shadingEngine"
|
shape, destination=True, type="shadingEngine"
|
||||||
) or []
|
) or []
|
||||||
for shading_engine in shading_engines:
|
for shading_engine in shading_engines:
|
||||||
name = (
|
materials = cmds.listConnections(
|
||||||
cmds.listConnections(shading_engine + ".surfaceShader")[0]
|
shading_engine + ".surfaceShader",
|
||||||
+ "SG"
|
source=True, destination=False
|
||||||
)
|
)
|
||||||
|
if not materials:
|
||||||
|
cls.log.warning(
|
||||||
|
"Shading engine '{}' has no material connected to its "
|
||||||
|
".surfaceShader attribute.".format(shading_engine))
|
||||||
|
continue
|
||||||
|
|
||||||
|
material = materials[0] # there should only ever be one input
|
||||||
|
name = material + "SG"
|
||||||
if shading_engine != name:
|
if shading_engine != name:
|
||||||
invalid.append(shading_engine)
|
invalid.append(shading_engine)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -316,6 +316,12 @@ class ExtractObjModel(BaseSettingsModel):
|
||||||
optional: bool = SettingsField(title="Optional")
|
optional: bool = SettingsField(title="Optional")
|
||||||
|
|
||||||
|
|
||||||
|
class ExtractModelModel(BaseSettingsModel):
|
||||||
|
enabled: bool = SettingsField(title="Enabled")
|
||||||
|
optional: bool = SettingsField(title="Optional")
|
||||||
|
active: bool = SettingsField(title="Active")
|
||||||
|
|
||||||
|
|
||||||
class ExtractMayaSceneRawModel(BaseSettingsModel):
|
class ExtractMayaSceneRawModel(BaseSettingsModel):
|
||||||
"""Add loaded instances to those published families:"""
|
"""Add loaded instances to those published families:"""
|
||||||
enabled: bool = SettingsField(title="ExtractMayaSceneRaw")
|
enabled: bool = SettingsField(title="ExtractMayaSceneRaw")
|
||||||
|
|
@ -372,7 +378,9 @@ class ExtractLookModel(BaseSettingsModel):
|
||||||
|
|
||||||
|
|
||||||
class ExtractGPUCacheModel(BaseSettingsModel):
|
class ExtractGPUCacheModel(BaseSettingsModel):
|
||||||
enabled: bool = True
|
enabled: bool = SettingsField(title="Enabled")
|
||||||
|
optional: bool = SettingsField(title="Optional")
|
||||||
|
active: bool = SettingsField(title="Active")
|
||||||
families: list[str] = SettingsField(default_factory=list, title="Families")
|
families: list[str] = SettingsField(default_factory=list, title="Families")
|
||||||
step: float = SettingsField(1.0, ge=1.0, title="Step")
|
step: float = SettingsField(1.0, ge=1.0, title="Step")
|
||||||
stepSave: int = SettingsField(1, ge=1, title="Step Save")
|
stepSave: int = SettingsField(1, ge=1, title="Step Save")
|
||||||
|
|
@ -799,6 +807,10 @@ class PublishersModel(BaseSettingsModel):
|
||||||
default_factory=ExtractGPUCacheModel,
|
default_factory=ExtractGPUCacheModel,
|
||||||
title="Extract GPU Cache",
|
title="Extract GPU Cache",
|
||||||
)
|
)
|
||||||
|
ExtractModel: ExtractModelModel = SettingsField(
|
||||||
|
default_factory=ExtractModelModel,
|
||||||
|
title="Extract Model (Maya Scene)"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_SUFFIX_NAMING = {
|
DEFAULT_SUFFIX_NAMING = {
|
||||||
|
|
@ -1341,6 +1353,8 @@ DEFAULT_PUBLISH_SETTINGS = {
|
||||||
},
|
},
|
||||||
"ExtractGPUCache": {
|
"ExtractGPUCache": {
|
||||||
"enabled": False,
|
"enabled": False,
|
||||||
|
"optional": False,
|
||||||
|
"active": True,
|
||||||
"families": [
|
"families": [
|
||||||
"model",
|
"model",
|
||||||
"animation",
|
"animation",
|
||||||
|
|
@ -1353,5 +1367,10 @@ DEFAULT_PUBLISH_SETTINGS = {
|
||||||
"optimizeAnimationsForMotionBlur": True,
|
"optimizeAnimationsForMotionBlur": True,
|
||||||
"writeMaterials": True,
|
"writeMaterials": True,
|
||||||
"useBaseTessellation": True
|
"useBaseTessellation": True
|
||||||
|
},
|
||||||
|
"ExtractModel": {
|
||||||
|
"enabled": True,
|
||||||
|
"optional": True,
|
||||||
|
"active": True,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""Package declaring addon version."""
|
"""Package declaring addon version."""
|
||||||
__version__ = "0.1.12"
|
__version__ = "0.1.13"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue