-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add sourcefile extractor - Repair ability to include multiple representations - Round up, shape up, and get ready for tests on virtual machines.
- Loading branch information
Showing
12 changed files
with
236 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
dist | ||
cover | ||
.coverage | ||
user | ||
stage | ||
shared |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import pyblish.api | ||
|
||
|
||
class ExtractStarterSource(pyblish.api.InstancePlugin): | ||
"""Extract copy of working file at time of publish""" | ||
|
||
label = "Starter Source" | ||
order = pyblish.api.ExtractorOrder | ||
hosts = ["maya"] | ||
families = [ | ||
"starter.model", | ||
"starter.rig", | ||
"starter.animation", | ||
] | ||
|
||
def process(self, instance): | ||
import os | ||
from maya import cmds | ||
from pyblish_starter import api | ||
|
||
dirname = api.format_staging_dir( | ||
root=instance.context.data["workspaceDir"], | ||
name=instance.data["name"]) | ||
|
||
try: | ||
os.makedirs(dirname) | ||
except OSError: | ||
pass | ||
|
||
filename = "source.ma" | ||
|
||
path = os.path.join(dirname, filename) | ||
|
||
# Perform extraction | ||
self.log.info("Performing extraction..") | ||
cmds.file(path, | ||
force=True, | ||
typ="mayaAscii", | ||
exportAll=True, | ||
preserveReferences=False, | ||
constructionHistory=True) | ||
|
||
# Store reference for integration | ||
if "files" not in instance.data: | ||
instance.data["files"] = list() | ||
|
||
instance.data["files"].append(filename) | ||
instance.data["stagingDir"] = dirname | ||
|
||
self.log.info("Extracted {instance} to {path}".format(**locals())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import sys | ||
import contextlib | ||
|
||
from ...vendor.Qt import QtWidgets, QtCore | ||
from ... import api | ||
|