Skip to content

Commit

Permalink
Made slight changes to the alembic exporter so it recognizes single A…
Browse files Browse the repository at this point in the history
…ND multiple pieces that are tagged.
  • Loading branch information
cdwasden committed Oct 5, 2015
1 parent 85f0070 commit aa7d918
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions maya-tools/shelf/scripts/alembic_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,16 @@ def build_alembic_command(self, ref, abcfilepath):

if tagged == "":
return ""
print "tagged: " + ' '.join(tagged)

# Then we get the dependencies of that item to be tagged.
depList = self.get_dependancies(ref)

# This determines the pieces that are going to be exported via alembic.
roots_string = ""
# roots_string = " ".join([roots_string, "-root %s"%(tagged.name())])
print "tagged: "
print tagged

# Each of these should be in a list, so it should know how many to add the -root tag to the alembic.
for alem_obj in tagged:
print "alem_obj: " + alem_obj
roots_string += (" -root %s"%(alem_obj))
Expand Down Expand Up @@ -181,8 +183,10 @@ def get_tagged_node(self, ref):
# Looks for a tagged node that has the BYU Alembic Export flag on it.
refNodes = cmds.referenceQuery(unicode(ref), nodes=True)
rootNode = ls(refNodes[0])
taggedNode = []
if rootNode[0].hasAttr("BYU_Alembic_Export_Flag"):
taggedNode = rootNode[0]
# taggedNode = rootNode[0]
taggedNode.append(rootNode[0])
else:
# Otherwise get the tagged node that is in the children.
taggedNode = self.get_tagged_children(rootNode[0])
Expand Down

0 comments on commit aa7d918

Please sign in to comment.