mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +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
|
||||
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
|
||||
global ABOUT_TO_SAVE
|
||||
ABOUT_TO_SAVE = False
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ from __future__ import absolute_import
|
|||
import pyblish.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):
|
||||
|
|
@ -112,20 +115,25 @@ class SelectInvalidAction(pyblish.api.Action):
|
|||
except ImportError:
|
||||
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
|
||||
self.log.info("Finding invalid nodes..")
|
||||
invalid = list()
|
||||
for instance in errored_instances:
|
||||
invalid_nodes = plugin.get_invalid(instance)
|
||||
if invalid_nodes:
|
||||
if isinstance(invalid_nodes, (list, tuple)):
|
||||
invalid.extend(invalid_nodes)
|
||||
else:
|
||||
self.log.warning("Plug-in returned to be invalid, "
|
||||
"but has no selectable nodes.")
|
||||
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:
|
||||
invalid_nodes = plugin.get_invalid(instance)
|
||||
if invalid_nodes:
|
||||
if isinstance(invalid_nodes, (list, tuple)):
|
||||
invalid.extend(invalid_nodes)
|
||||
else:
|
||||
self.log.warning("Plug-in returned to be invalid, "
|
||||
"but has no selectable nodes.")
|
||||
|
||||
# Ensure unique (process each node only once)
|
||||
invalid = list(set(invalid))
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@ def override_toolbox_ui():
|
|||
annotation="Look Manager",
|
||||
label="Look Manager",
|
||||
image=os.path.join(icons, "lookmanager.png"),
|
||||
command=show_look_assigner,
|
||||
command=lambda: show_look_assigner(
|
||||
parent=parent_widget
|
||||
),
|
||||
width=icon_size,
|
||||
height=icon_size,
|
||||
parent=parent
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ from maya import cmds
|
|||
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."""
|
||||
|
||||
label = "GPU Cache"
|
||||
|
|
@ -20,6 +21,9 @@ class ExtractGPUCache(publish.Extractor):
|
|||
useBaseTessellation = True
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
return
|
||||
|
||||
cmds.loadPlugin("gpuCache", quiet=True)
|
||||
|
||||
staging_dir = self.staging_dir(instance)
|
||||
|
|
|
|||
|
|
@ -47,10 +47,18 @@ class ValidateShadingEngine(pyblish.api.InstancePlugin,
|
|||
shape, destination=True, type="shadingEngine"
|
||||
) or []
|
||||
for shading_engine in shading_engines:
|
||||
name = (
|
||||
cmds.listConnections(shading_engine + ".surfaceShader")[0]
|
||||
+ "SG"
|
||||
materials = cmds.listConnections(
|
||||
shading_engine + ".surfaceShader",
|
||||
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:
|
||||
invalid.append(shading_engine)
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,12 @@ class ExtractObjModel(BaseSettingsModel):
|
|||
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):
|
||||
"""Add loaded instances to those published families:"""
|
||||
enabled: bool = SettingsField(title="ExtractMayaSceneRaw")
|
||||
|
|
@ -372,7 +378,9 @@ class ExtractLookModel(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")
|
||||
step: float = SettingsField(1.0, ge=1.0, title="Step")
|
||||
stepSave: int = SettingsField(1, ge=1, title="Step Save")
|
||||
|
|
@ -799,6 +807,10 @@ class PublishersModel(BaseSettingsModel):
|
|||
default_factory=ExtractGPUCacheModel,
|
||||
title="Extract GPU Cache",
|
||||
)
|
||||
ExtractModel: ExtractModelModel = SettingsField(
|
||||
default_factory=ExtractModelModel,
|
||||
title="Extract Model (Maya Scene)"
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_SUFFIX_NAMING = {
|
||||
|
|
@ -1341,6 +1353,8 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
},
|
||||
"ExtractGPUCache": {
|
||||
"enabled": False,
|
||||
"optional": False,
|
||||
"active": True,
|
||||
"families": [
|
||||
"model",
|
||||
"animation",
|
||||
|
|
@ -1353,5 +1367,10 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"optimizeAnimationsForMotionBlur": True,
|
||||
"writeMaterials": True,
|
||||
"useBaseTessellation": True
|
||||
},
|
||||
"ExtractModel": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring addon version."""
|
||||
__version__ = "0.1.12"
|
||||
__version__ = "0.1.13"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue