示例#1
0
        public void Do()
        {
            if (!scene.Children.Contains(originalItem))
            {
                return;
            }

            scene.Children.Modify(list =>
            {
                // Remove the group
                list.Remove(originalItem);

                // Apply transform
                foreach (var child in originalItem.Children)
                {
                    child.Matrix *= originalItem.Matrix;
                }

                // Add all children from the group
                list.AddRange(originalItem.Children);
            });

            scene.SelectLastChild();
            scene.Invalidate(new InvalidateArgs(null, InvalidateType.Children));
        }
示例#2
0
        public void Do()
        {
            scene.ClearSelection();

            scene.Children.Modify(list =>
            {
                foreach (var item in items)
                {
                    list.Remove(item);
                }
            });

            scene.SelectLastChild();

            scene.Invalidate(new InvalidateArgs(null, InvalidateType.Content));
        }