mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Support making maya ExtractGpuCache optional
This commit is contained in:
parent
312e0e7ad4
commit
caebcd2b43
2 changed files with 9 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -373,6 +373,8 @@ class ExtractLookModel(BaseSettingsModel):
|
|||
|
||||
class ExtractGPUCacheModel(BaseSettingsModel):
|
||||
enabled: bool = True
|
||||
optional: bool = True
|
||||
active: bool = True
|
||||
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")
|
||||
|
|
@ -1341,6 +1343,8 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
},
|
||||
"ExtractGPUCache": {
|
||||
"enabled": False,
|
||||
"optional": False,
|
||||
"active": True,
|
||||
"families": [
|
||||
"model",
|
||||
"animation",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue