public void NodeRemove(Node remove) { foreach (var node in Model.Nodes) { if (node.Parent == remove) { remove.Remove(node); } if (remove.Parent == node) { node.Remove(remove); } } if (Model.Root.Children.Contains(remove)) { Model.Root.Remove(remove); } Model.Nodes.Remove(remove); if (Model.Vrm != null) { if (Model.Vrm.ExpressionManager != null) { foreach (var b in Model.Vrm.ExpressionManager.ExpressionList) { foreach (var v in b.MorphTargetBinds) { if (v.Node == remove) { throw new NotImplementedException("referenced from morphtargetbind"); } } } } if (Model.Vrm.FirstPerson != null) { foreach (var a in Model.Vrm.FirstPerson.Annotations) { if (a.Node == remove) { throw new NotImplementedException("referenced from firstPerson"); } } } } }
public void NodeRemove(Node remove) { foreach (var node in Model.Nodes) { if (node.Parent == remove) { remove.Remove(node); } if (remove.Parent == node) { node.Remove(remove); } } if (Model.Root.Children.Contains(remove)) { Model.Root.Remove(remove); } Model.Nodes.Remove(remove); if (Model.Vrm != null) { if (Model.Vrm.BlendShape != null) { foreach (var b in Model.Vrm.BlendShape.BlendShapeList) { foreach (var v in b.BlendShapeValues) { if (v.Node == remove) { throw new NotImplementedException("referenced from blendShape"); } } } } if (Model.Vrm.FirstPerson != null) { foreach (var a in Model.Vrm.FirstPerson.Annotations) { if (a.Node == remove) { throw new NotImplementedException("referenced from firstPerson"); } } } } }
public void NodeRemove(Node remove) { foreach (var node in Model.Nodes) { if (node.Parent == remove) { remove.Remove(node); } if (remove.Parent == node) { node.Remove(remove); } } if (Model.Root.Children.Contains(remove)) { Model.Root.Remove(remove); } Model.Nodes.Remove(remove); }