mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
fix the ancestor issues for bbox selection
This commit is contained in:
parent
b0e8490dd0
commit
debcf19e68
2 changed files with 7 additions and 17 deletions
|
|
@ -24,8 +24,6 @@ class CreateProxyAlembic(plugin.Creator):
|
|||
self.data["writeColorSets"] = self.write_color_sets
|
||||
# Vertex colors with the geometry.
|
||||
self.data["writeFaceSets"] = self.write_face_sets
|
||||
# only nodes which are visible
|
||||
self.data["visibleOnly"] = False
|
||||
# Default to exporting world-space
|
||||
self.data["worldSpace"] = True
|
||||
|
||||
|
|
|
|||
|
|
@ -92,12 +92,10 @@ class ExtractProxyAlembic(publish.Extractor):
|
|||
|
||||
def create_proxy_geometry(self, instance, name_suffix, start, end):
|
||||
nodes = instance[:]
|
||||
if instance.data.get("visibleOnly", False):
|
||||
nodes = list(iter_visible_nodes_in_range(nodes,
|
||||
start=start,
|
||||
end=end))
|
||||
nodes = list(iter_visible_nodes_in_range(nodes,
|
||||
start=start,
|
||||
end=end))
|
||||
inst_selection = cmds.ls(nodes, long=True)
|
||||
proxy_root = []
|
||||
bbox = cmds.geomToBBox(inst_selection,
|
||||
nameSuffix=name_suffix,
|
||||
keepOriginal=True,
|
||||
|
|
@ -105,13 +103,7 @@ class ExtractProxyAlembic(publish.Extractor):
|
|||
bakeAnimation=True,
|
||||
startTime=start,
|
||||
endTime=end)
|
||||
for b in bbox:
|
||||
dep_node = cmds.ls(b, dag=True, shapes=False,
|
||||
noIntermediate=True, sn=True)
|
||||
|
||||
for dep in dep_node:
|
||||
if "Shape" in dep:
|
||||
continue
|
||||
proxy_root.append(dep)
|
||||
self.log.debug("proxy_root: {}".format(proxy_root))
|
||||
return proxy_root
|
||||
bbox_sel = cmds.ls(sl=True, long=True)
|
||||
# bbox_sel = cmds.listRelatives(allDescendents=True, fullPath=True, type="mesh")
|
||||
self.log.debug("proxy_root: {}".format(bbox_sel))
|
||||
return bbox_sel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue