Optimize saved reference path
This commit is contained in:
1 parent
cf4f22d267
commit
7abd313d9a
1 file changed
+6
@@ -20,6 +20,12 @@ function newFoundationsFunctionLibraryAttachDetach() {
|
||||
// Store the path to the reference parent to make restoring it possible if the reference partent is updated and given a new id
|
||||
function storeAttachNodePath(node, attachToNode) {
|
||||
let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode)
|
||||
// Remove unused node id, and project tag from stored path
|
||||
for (let i = 0; i < attachNodePath.length; i++ ) {
|
||||
attachNodePath[i].splice(2,2)
|
||||
console.log(" this is spliced array ", attachNodePath)
|
||||
}
|
||||
|
||||
// Save attach path to active payload
|
||||
node.payload.referenceParentCombinedNodePath = attachNodePath
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user