This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
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 #2068 from davidlatwe/feature/PYPE-1395_Validate-s…
…etdress-top-group
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 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
25 changes: 25 additions & 0 deletions
25
openpype/hosts/maya/plugins/publish/validate_setdress_root.py
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,25 @@ | ||
|
||
import pyblish.api | ||
import openpype.api | ||
|
||
|
||
class ValidateSetdressRoot(pyblish.api.InstancePlugin): | ||
""" | ||
""" | ||
|
||
order = openpype.api.ValidateContentsOrder | ||
label = "SetDress Root" | ||
hosts = ["maya"] | ||
families = ["setdress"] | ||
|
||
def process(self, instance): | ||
from maya import cmds | ||
|
||
if instance.data.get("exactSetMembersOnly"): | ||
return | ||
|
||
set_member = instance.data["setMembers"] | ||
root = cmds.ls(set_member, assemblies=True, long=True) | ||
|
||
if not root or root[0] not in set_member: | ||
raise Exception("Setdress top root node is not being published.") |