Simplify a tree which contains a single item, component not working

Hey there,

Is there any reason why the “Simplify Tree” native component doesn’t work on a single item tree whereas the SDK command DataTree.SimplifyPaths does? Is it an intended behavior?

Cheers

– Xavier

Simplify removes all those indices that are shared amongst all the paths in a tree. If there’s only a single path, the concept of ‘shared’ no longer works.

Ok, your software, your rules :slight_smile:

If I can suggest, this creates a lot of hassle when doing index-based operations later on : when the tree shrinks from 2+ branches to one, indices are completely reshuffled due to this simplify operation not being performed anymore. I think the behavior of the SDK function is more convenient. My 2 cents.

But I agree, problem would persist if the previous tree couldn’t be simplified to paths with a depth of one.

Yeah I know, it’s not that helpful this way, even if it is consistent. In GH2 the Simplify behaviour has been adjusted to remove all zeroes from a single path, but to leave one in case there’s only zeroes.

1 Like

i just jumped to the same problem … i am merging some attributes trees and when selection shrinks to one object it doesnt work. logically simplify on single item should do what sdk does… my opinion

could you please share the c sharp node with me?

Hi, I have created a video tutorial where I explain why to avoid simplifying data trees. You can check the video here: https://youtu.be/-DNYJAcoD5E