Showing the changes to interface/src/ClipboardScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -92,23 +92,4 @@ void ClipboardScriptingInterface::nudgeVoxel(float x, float y, float z, float s, · 91 unmodified lines | |||
| 92 | s / (float)TREE_SCALE }; | 92 | s / (float)TREE_SCALE }; |
| 93 | 93 | ||
| 94 | Application::getInstance()->nudgeVoxelsByVector(sourceVoxel, nudgeVecInTreeSpace); | 94 | Application::getInstance()->nudgeVoxelsByVector(sourceVoxel, nudgeVecInTreeSpace); |
| 95 | } | ||
| 96 | |||
| 97 | void ClipboardScriptingInterface::copyTo(float x, float y, float z, float s, | ||
| 98 | const QString source, const QString destination) { | ||
| 99 | StrongVoxelTreePointer sourceTree = LocalVoxelsList::getInstance()->getTree(source); | ||
| 100 | StrongVoxelTreePointer destinationTree = LocalVoxelsList::getInstance()->getTree(destination); | ||
| 101 | |||
| 102 | VoxelTreeElement* destinationNode = destinationTree->getVoxelAt(x, y, z, s); | ||
| 103 | destinationTree->copyFromTreeIntoSubTree(sourceTree.data(), destinationNode); | ||
| 104 | |||
| 105 | } | ||
| 106 | |||
| 107 | void ClipboardScriptingInterface::pasteFrom(float x, float y, float z, float s, | ||
| 108 | const QString source, const QString destination) { | ||
| 109 | StrongVoxelTreePointer sourceTree = LocalVoxelsList::getInstance()->getTree(source); | ||
| 110 | StrongVoxelTreePointer destinationTree = LocalVoxelsList::getInstance()->getTree(destination); | ||
| 111 | |||
| 112 | VoxelTreeElement* sourceNode = sourceTree->getVoxelAt(x, y, z, s); | ||
| 113 | destinationTree->copySubTreeIntoNewTree(sourceNode, destinationTree.data(), true); | ||
| 114 | } | 95 | } |