Remove unused code

This commit is contained in:
Roy Nieterau 2018-12-13 14:48:59 +01:00
parent 7711938d36
commit bff76636df

View file

@ -7,34 +7,6 @@ import colorbleed.api
from colorbleed.maya.lib import extract_alembic
def iter_parents(node):
n = node.count("|")
for i in range(1, n):
yield node.rsplit("|", i)[0]
def get_highest_in_hierarchy(nodes):
"""Return the highest in the hierachies from nodes
This will return each highest node in separate hierarchies.
E.g.
get_highest_in_hierarchy(["|A|B|C", "A|B", "D|E"])
# ["A|B", "D|E"]
"""
# Ensure we use long names
nodes = cmds.ls(nodes, long=True)
lookup = set(nodes)
highest = []
for node in nodes:
# If no parents are within the original list
# then this is a highest node
if not any(n in lookup for n in iter_parents(node)):
highest.append(node)
return highest
class ExtractColorbleedAlembic(colorbleed.api.Extractor):
"""Produce an alembic of just point positions and normals.