mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
🐕🦺 shut up hound
This commit is contained in:
parent
96af815879
commit
f0a394bfd9
1 changed files with 12 additions and 11 deletions
|
|
@ -7,6 +7,7 @@ import pyblish.api
|
||||||
from openpype.pipeline import publish
|
from openpype.pipeline import publish
|
||||||
from openpype.hosts.maya.api import lib
|
from openpype.hosts.maya.api import lib
|
||||||
|
|
||||||
|
|
||||||
class ExtractObj(publish.Extractor):
|
class ExtractObj(publish.Extractor):
|
||||||
"""Extract OBJ from Maya.
|
"""Extract OBJ from Maya.
|
||||||
|
|
||||||
|
|
@ -34,11 +35,11 @@ class ExtractObj(publish.Extractor):
|
||||||
|
|
||||||
members = instance.data("setMembers")
|
members = instance.data("setMembers")
|
||||||
members = cmds.ls(members,
|
members = cmds.ls(members,
|
||||||
dag=True,
|
dag=True,
|
||||||
shapes=True,
|
shapes=True,
|
||||||
type=("mesh", "nurbsCurve"),
|
type=("mesh", "nurbsCurve"),
|
||||||
noIntermediate=True,
|
noIntermediate=True,
|
||||||
long=True)
|
long=True)
|
||||||
self.log.info("Members: {0}".format(members))
|
self.log.info("Members: {0}".format(members))
|
||||||
self.log.info("Instance: {0}".format(instance[:]))
|
self.log.info("Instance: {0}".format(instance[:]))
|
||||||
|
|
||||||
|
|
@ -58,17 +59,17 @@ class ExtractObj(publish.Extractor):
|
||||||
with lib.maintained_selection():
|
with lib.maintained_selection():
|
||||||
cmds.select(members, noExpand=True)
|
cmds.select(members, noExpand=True)
|
||||||
cmds.file(path,
|
cmds.file(path,
|
||||||
exportSelected=True,
|
exportSelected=True,
|
||||||
type='OBJexport',
|
type='OBJexport',
|
||||||
preserveReferences=True,
|
preserveReferences=True,
|
||||||
force=True)
|
force=True)
|
||||||
|
|
||||||
if "representation" not in instance.data:
|
if "representation" not in instance.data:
|
||||||
instance.data["representation"] = []
|
instance.data["representation"] = []
|
||||||
|
|
||||||
representation = {
|
representation = {
|
||||||
'name':'obj',
|
'name': 'obj',
|
||||||
'ext':'obj',
|
'ext': 'obj',
|
||||||
'files': filename,
|
'files': filename,
|
||||||
"stagingDir": staging_dir,
|
"stagingDir": staging_dir,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue