示例#1
0
        public static void Paste(this InteractiveScene scene)
        {
            if (Clipboard.Instance.ContainsText)
            {
                if (Clipboard.Instance.GetText() == "!--IObjectSelection--!")
                {
                    scene.DuplicateItem(ApplicationController.ClipboardItem);
                }
            }
            else if (Clipboard.Instance.ContainsImage)
            {
                // Persist
                string filePath = ApplicationDataStorage.Instance.GetNewLibraryFilePath(".png");
                AggContext.ImageIO.SaveImageData(
                    filePath,
                    Clipboard.Instance.GetImage());

                scene.UndoBuffer.AddAndDo(
                    new InsertCommand(
                        scene,
                        new ImageObject3D()
                {
                    AssetPath = filePath
                }));
            }
        }
示例#2
0
 public static void Paste(this InteractiveScene scene)
 {
     if (Clipboard.Instance.ContainsText)
     {
         if (Clipboard.Instance.GetText() == "!--IObjectSelection--!")
         {
             scene.DuplicateItem(ApplicationController.ClipboardItem);
         }
     }
 }