mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
supports to publish groom presets in ornatrix rig extractor
This commit is contained in:
parent
e25137f137
commit
d4ca4f8a36
1 changed files with 13 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ import json
|
|||
|
||||
from ayon_maya.api import lib
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds
|
||||
from maya import cmds, mel
|
||||
|
||||
|
||||
class ExtractOxRig(plugin.MayaExtractorPlugin):
|
||||
|
|
@ -77,6 +77,7 @@ class ExtractOxRig(plugin.MayaExtractorPlugin):
|
|||
# Ornatrix related staging dirs
|
||||
maya_path = os.path.join(dirname,
|
||||
"ornatrix_rig.{}".format(self.scene_type))
|
||||
ox_groom_path = os.path.join(dirname, "ornatrix_rig.oxg.yaml")
|
||||
nodes = instance.data["setMembers"]
|
||||
with lib.maintained_selection():
|
||||
with lib.attribute_values(texture_attributes):
|
||||
|
|
@ -88,6 +89,7 @@ class ExtractOxRig(plugin.MayaExtractorPlugin):
|
|||
preserveReferences=False,
|
||||
constructionHistory=True,
|
||||
shader=False)
|
||||
mel.eval(f"OxSaveGroom -path {ox_groom_path}")
|
||||
|
||||
# Ensure files can be stored
|
||||
# build representations
|
||||
|
|
@ -104,6 +106,16 @@ class ExtractOxRig(plugin.MayaExtractorPlugin):
|
|||
}
|
||||
)
|
||||
|
||||
self.log.debug("OxGroom file: {}".format(ox_groom_path))
|
||||
instance.data["representations"].append(
|
||||
{
|
||||
'name': "yaml",
|
||||
'ext': "yaml",
|
||||
'files': os.path.basename(ox_groom_path),
|
||||
'stagingDir': dirname
|
||||
}
|
||||
)
|
||||
|
||||
self.log.debug("settings file: {}".format(settings_path))
|
||||
instance.data["representations"].append(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue