This commit is contained in:
Ondrej Samohel 2022-01-20 17:18:06 +01:00
parent 47244a3917
commit c88f95fa6f
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 6 additions and 3 deletions

View file

@ -2877,4 +2877,3 @@ def root_parent(nodes):
for node in node_parents:
if node[1]:
node[0].setParent(node[1])

View file

@ -49,7 +49,10 @@ class CreateUnrealStaticMesh(plugin.Creator):
children = cmds.ls(children, type="transform")
for node in children:
if cmds.listRelatives(node, type="shape"):
if [n for n in self.collision_prefixes if node.startswith(n)]:
if [
n for n in self.collision_prefixes
if node.startswith(n)
]:
cmds.sets(node, forceElement=collisions_set)
else:
cmds.sets(node, forceElement=geometry_set)

View file

@ -30,7 +30,8 @@ class ValidateAssemblyName(pyblish.api.InstancePlugin):
descendants = cmds.listRelatives(content_instance,
allDescendents=True,
fullPath=True) or []
descendants = cmds.ls(descendants, noIntermediate=True, type="transform")
descendants = cmds.ls(
descendants, noIntermediate=True, type="transform")
content_instance = list(set(content_instance + descendants))
assemblies = cmds.ls(content_instance, assemblies=True, long=True)