Don't auto-select descendants of a model or folder when Undoing a deletion

Do not auto-select descendants of a model or a folder when Undoing deletions. Why? Because when you’re working with a large amount of models that you deleted, i.e. by replacing models with newer ones, it can take a long time for Studio to select every single model’s descendants.

For instance, in my game, I have a ton of pickups that I’m currently replacing. However, due to the nature of the current way of auto-selecting undeleted models, it’s taking an upwards of 5 minutes for Studio to stop selecting everything. Even as I’m writing this, it’s still going.

This should be addressed in removal of this “feature” or have it be an option under Studio.

47 Likes

Support for this, having to auto-select Parts, Models, Instances and Scripts after undo/deleting after doing that specific action is annoying me and possibly for the past couple of years as I’m tired of this action happening every time you delete and undo that specific action.

Same with your situation, I have a lot of folders and scripts inside many of my games and having to delete a single or multiple instances and objects as I have to delete some random instances and then deleting one of those instances and making the same mistake over and over again with everything else until you’re finished with what you’ve done.

Video:

^ Just a visualization/video of this feature.

I would like to see an option inside studio settings to either have it selected or un-selected when undoing a deletion or other actions inside studio in the following months to come; having it removed isn’t the best solution as some developers might still want it so it selects deleted instances and some don’t want to, so an option inside settings is the best solution.

5 Likes

Seriously frustrating “feature” that should be removed or changed. It makes no sense as it is.

7 Likes

Instead of the feature being removed all together, I would prefer for an update whereby the deleted object just reselect itself after its deletion got reverted.

I do agree that the current behavior is extremely annoying.

5 Likes

Simply reselecting the highest ancestor would be perfect.

I.e. if you have a model with a million parts, it only selects the model, not the million parts and their children.

The current functionality basically punishes you for undoing changes.

3 Likes

My Studio Tweaks plugin attempts to do smarter reselection like this, however the algorithm isn’t perfect yet (is missing recursive behavior), and is definitely sub-optimal because the selection Studio generates on undo does not contain any instances that are not parts or models (e.g. Folders). This results in needing to jump through a lot of expensive algorithmic hoops to go from the list of reselected instances on undo, to a list of highest common ancestors including containers such as Folders and Scripts (which makes sense to select instead, since the draggers will move all children of a selected instance just the same as a model).

Even in my algorithm’s imperfect state however, it is significantly more tolerable, which you can see in this below example. The problem happens when Studio begins trying to update the explorer, but if you intercept the selection immediately on undo and clear it to an empty table, the problem does not happen (which my plugin also lets you do).

i.e. If all children of a parent that are parts/models or contain part/model descendants will be reselected, do not select those children and select the parent instead. Start from the very bottom of the instance tree, and do this recursively until the highest common ancestors are found. This rule is is significantly better than the current behavior, and should result in the draggers affecting the parts you’d expect them to affect after undoing. Most often, when you delete some parts and then undo, you either plan to deselect right away, or you plan to continue manipulating them with the draggers, so since the draggers still affect only the parts you’d currently expect after undoing, this is most likely fine.

I imagine performance doing this will be better than my plugin if it can be done with C++ rather than Lua. This functionality really shouldn’t need to be provided by a plugin. Studio should seek highest common ancestors when undoing a delete.

My plugin’s behavior using the above rule:

https://gfycat.com/PhonyKeyAlaskanhusky

The default behavior:

https://gfycat.com/cheerybestflee

3 Likes

Your plugin also seems to solve a lot of my other issues with Studio - i.e. the obtrusive and obnoxiously oversized selection box.

Good work!

2 Likes

Would love to see this feature added. I’m currently trying to optimize my game (requires deleting lots of models/folders that have large parts) - but I sometimes undo it to count the parts. Really frustrating.