mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Refactor rig's "pointcache_SET" to "out_SET"
This commit is contained in:
parent
47c60ed1d3
commit
19e8cc31c5
6 changed files with 15 additions and 15 deletions
|
|
@ -13,5 +13,5 @@ class CreateRig(avalon.maya.Creator):
|
|||
instance = super(CreateRig, self).process()
|
||||
|
||||
controls = cmds.sets(name="controls_SET", empty=True)
|
||||
pointcache = cmds.sets(name="pointcache_SET", empty=True)
|
||||
pointcache = cmds.sets(name="out_SET", empty=True)
|
||||
cmds.sets([controls, pointcache], forceElement=instance)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import colorbleed.api
|
|||
|
||||
|
||||
class ValidateRigPointcacheNodeIds(pyblish.api.InstancePlugin):
|
||||
"""Validate rig pointcache_SET nodes have ids
|
||||
"""Validate rig out_SET nodes have ids
|
||||
|
||||
The nodes in a rig's pointcache_SET must all have node IDs
|
||||
The nodes in a rig's out_SET must all have node IDs
|
||||
that are all unique.
|
||||
|
||||
Geometry in a rig should be using published model's geometry.
|
||||
|
|
@ -29,9 +29,9 @@ class ValidateRigPointcacheNodeIds(pyblish.api.InstancePlugin):
|
|||
def get_invalid(cls, instance):
|
||||
from maya import cmds
|
||||
|
||||
# Get pointcache_SET
|
||||
# Get out_SET
|
||||
sets = cmds.ls(instance, type='objectSet')
|
||||
pointcache_sets = [x for x in sets if x == 'pointcache_SET']
|
||||
pointcache_sets = [x for x in sets if x == 'out_SET']
|
||||
|
||||
nodes = list()
|
||||
for s in pointcache_sets:
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ class ValidateRigPointcacheShapeRenderStats(pyblish.api.Validator):
|
|||
@classmethod
|
||||
def get_pointcache_nodes(cls, instance):
|
||||
|
||||
# Get pointcache_SET
|
||||
# Get out_SET
|
||||
sets = cmds.ls(instance, type='objectSet')
|
||||
pointcache_sets = [x for x in sets if x == 'pointcache_SET']
|
||||
pointcache_sets = [x for x in sets if x == 'out_SET']
|
||||
|
||||
nodes = list()
|
||||
for s in pointcache_sets:
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class CollectLook(pyblish.api.InstancePlugin):
|
|||
hosts = ["maya"]
|
||||
|
||||
# Ignore specifically named sets (check with endswith)
|
||||
IGNORE = ["pointcache_SET", "controls_SET", "_INST"]
|
||||
IGNORE = ["out_SET", "controls_SET", "_INST"]
|
||||
|
||||
def collect(self, instance):
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class ValidateRigContents(pyblish.api.InstancePlugin):
|
|||
|
||||
Every rig must contain at least two object sets:
|
||||
"controls_SET" - Set of all animatable controls
|
||||
"pointcache_SET" - Set of all cachable meshes
|
||||
"out_SET" - Set of all cachable meshes
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ class ValidateRigContents(pyblish.api.InstancePlugin):
|
|||
|
||||
from maya import cmds
|
||||
|
||||
objsets = ("controls_SET", "pointcache_SET")
|
||||
objsets = ("controls_SET", "out_SET")
|
||||
|
||||
missing = list()
|
||||
for objset in objsets:
|
||||
|
|
@ -40,7 +40,7 @@ class ValidateRigContents(pyblish.api.InstancePlugin):
|
|||
|
||||
self.log.info("Evaluating contents of object sets..")
|
||||
not_meshes = list()
|
||||
members = cmds.sets("pointcache_SET", query=True) or []
|
||||
members = cmds.sets("out_SET", query=True) or []
|
||||
shapes = cmds.listRelatives(members,
|
||||
allDescendents=True,
|
||||
shapes=True,
|
||||
|
|
@ -59,5 +59,5 @@ class ValidateRigContents(pyblish.api.InstancePlugin):
|
|||
% not_transforms)
|
||||
|
||||
assert not_meshes == [], (
|
||||
"Only meshes can be part of the pointcache_SET: %s"
|
||||
"Only meshes can be part of the out_SET: %s"
|
||||
% not_meshes)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import cbra.utils.maya.node_uuid as id_utils
|
|||
|
||||
|
||||
class ValidateRigPointcacheRelatedNodeIds(pyblish.api.InstancePlugin):
|
||||
"""Validate rig pointcache_SET nodes have related ids to current context
|
||||
"""Validate rig out_SET nodes have related ids to current context
|
||||
|
||||
An ID is 'related' if its built in the current Item.
|
||||
|
||||
|
|
@ -29,9 +29,9 @@ class ValidateRigPointcacheRelatedNodeIds(pyblish.api.InstancePlugin):
|
|||
@classmethod
|
||||
def get_pointcache_nodes(cls, instance):
|
||||
|
||||
# Get pointcache_SET
|
||||
# Get out_SET
|
||||
sets = cmds.ls(instance, type='objectSet')
|
||||
pointcache_sets = [x for x in sets if x == 'pointcache_SET']
|
||||
pointcache_sets = [x for x in sets if x == 'out_SET']
|
||||
|
||||
nodes = list()
|
||||
for s in pointcache_sets:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue