-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from mottosso/master
- Loading branch information
Showing
11 changed files
with
134 additions
and
25 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
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,3 @@ | ||
### Example | ||
|
||
This directory represents a shared network location. |
10 changes: 10 additions & 0 deletions
10
example/projects/hulk/assets/Bruce/work/temp/marcus/maya/workspace.mel
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,10 @@ | ||
//Maya 2016 Project Definition | ||
|
||
workspace -fr "shaders" "renderData/shaders"; | ||
workspace -fr "alembicCache" "cache/alembic"; | ||
workspace -fr "mayaAscii" "scenes"; | ||
workspace -fr "mayaBinary" "scenes"; | ||
workspace -fr "renderData" "renderData"; | ||
workspace -fr "fileCache" "cache/nCache"; | ||
workspace -fr "scene" "scenes"; | ||
workspace -fr "sourceImages" "sourceimages"; |
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,40 @@ | ||
import pyblish.api | ||
|
||
|
||
class ValidateMindbenderLookdevSingleShape(pyblish.api.InstancePlugin): | ||
"""One mesh per transform""" | ||
|
||
label = "Lookdev Member Shapes" | ||
order = pyblish.api.ValidatorOrder | ||
hosts = ["maya"] | ||
families = ["mindbender.lookdev"] | ||
|
||
def process(self, instance): | ||
from maya import cmds | ||
|
||
has_multiple_shapes = list() | ||
for node in instance: | ||
|
||
children = cmds.listRelatives(node, allDescendents=True) or list() | ||
shapes = cmds.listRelatives(node, shapes=True) or list() | ||
|
||
# Ensure there is only one child; there could be many, | ||
# including other transform nodes. | ||
has_single_shape = len(children) == 1 | ||
|
||
# Ensure the one child is a shape | ||
has_single_child = len(shapes) == 1 | ||
|
||
# Ensure the one child is of type "mesh" | ||
has_single_mesh = cmds.nodeType(shapes[0]) == "mesh" | ||
|
||
if not all([has_single_child, | ||
has_single_shape, | ||
has_single_mesh]): | ||
has_multiple_shapes.append(node) | ||
|
||
assert not has_multiple_shapes, ( | ||
"\"%s\" has transforms with multiple shapes: %s" % ( | ||
instance, ", ".join( | ||
"\"" + member + "\"" for member in has_multiple_shapes)) | ||
) |
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,23 @@ | ||
import pyblish.api | ||
|
||
|
||
class ValidateMindbenderLookdevMembers(pyblish.api.InstancePlugin): | ||
"""A lookdev instance must only contain members of type 'transform'""" | ||
|
||
label = "Lookdev Member Type" | ||
order = pyblish.api.ValidatorOrder | ||
hosts = ["maya"] | ||
families = ["mindbender.lookdev"] | ||
|
||
def process(self, instance): | ||
from maya import cmds | ||
|
||
has_wrong_type = list( | ||
node for node in instance | ||
if cmds.nodeType(node) != "transform" | ||
) | ||
|
||
assert not has_wrong_type, "\"%s\" is has_wrong_type members: %s" % ( | ||
instance, ", ".join("\"" + member + "\"" | ||
for member in has_wrong_type)) | ||
|
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,3 @@ | ||
### Resources | ||
|
||
Native files for various applications, including thumbnails, icons and data files. |
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,10 @@ | ||
//Maya 2016 Project Definition | ||
|
||
workspace -fr "shaders" "renderData/shaders"; | ||
workspace -fr "alembicCache" "cache/alembic"; | ||
workspace -fr "mayaAscii" "scenes"; | ||
workspace -fr "mayaBinary" "scenes"; | ||
workspace -fr "renderData" "renderData"; | ||
workspace -fr "fileCache" "cache/nCache"; | ||
workspace -fr "scene" "scenes"; | ||
workspace -fr "sourceImages" "sourceimages"; |