Skip to content

Commit 20e7fb3

Browse files
Fix incorrect sorting of nodes.
Issue #200.
1 parent ae7b236 commit 20e7fb3

File tree

1 file changed

+3
-2
lines changed
  • python/mmSolver/tools/reparent2

1 file changed

+3
-2
lines changed

python/mmSolver/tools/reparent2/lib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,11 @@ def reparent(children_nodes, parent_node,
160160

161161
# Sort nodes by depth, deeper nodes first, so we do do not remove
162162
# parents before children.
163-
nodes = node_utils.sort_nodes_by_depth(nodes, reverse=True)
163+
children = [tn.get_node() for tn in children_nodes]
164+
children = node_utils.sort_nodes_by_depth(children, reverse=True)
165+
children_nodes = [tfm_utils.TransformNode(node=n) for n in children]
164166

165167
loc_tfms = []
166-
children = [tn.get_node() for tn in children_nodes]
167168
for i, child in enumerate(children):
168169
tfm_name = 'dummy' + str(i + 1)
169170
shp_name = 'dummy' + str(i + 1) + 'Shape'

0 commit comments

Comments
 (0)