private void flaten_internal(List <Transform> nodes, Transform node) { if (MuscleMotionEditorUtil.conv(node) != MuscleMotion.Parts.Max) { nodes.Add(node); var children_num = node.childCount; for (var i = 0; i < children_num; ++i) { flaten_internal(nodes, node.GetChild(i)); } } }
private void collect_transforms_internal(List <TransformNode> transform_node_list, Transform parent_tfm, Transform tfm) { MuscleMotion.Parts parts = MuscleMotionEditorUtil.conv(tfm); if (parts == MuscleMotion.Parts.Max) { return; } MuscleMotion.Parts parent_parts = MuscleMotionEditorUtil.conv(parent_tfm); transform_node_list.Add(new TransformNode(tfm, parent_tfm, parts, parent_parts)); int num = tfm.childCount; for (var i = 0; i < num; ++i) { var child_tfm = tfm.GetChild(i); collect_transforms_internal(transform_node_list, tfm, child_tfm); } }