Empty groups persistence issue

Hi guys,

After some work using RC and Resthopper we have found and interesting behaviour related to groups that could have passed under Mcneel’s radar as it doesn’t affect the common GH user.

I couldn’t find in the forum any other thread about the issue so I’m creating this post. Please, fill free to close or link any related post if you know about them. Another thing that I don’t know is how recent is this issue, but it could be that it has been sitting there for a long time.

Issue:
If all elements contained in a group are deleted without deleting the group, the group collapses to a 0-sized group (docObject.Attirbutes.Bounds.IsEmpty) and remains in the definition, doesn’t matter if it is saved as *.gh or *.ghx format.

This is an issue especially if you use Resthopper and use groups to write/read inputs/outputs from the ghx.

Possible fixes:
As a user I see a couple of solutions. Probably there are quite a few more and better…

  • If the user try to delete the last component in a group without deleting the group itself, show a popup, telling the user that the group will be eliminated from the canvas as result of all its content been deleted.
  • If the last component in a group is deleted, provide a minimum size to groups so even without content, they can be seen in the canvas and managed by the user.

I hope that this helps people trying to debug definitions used in Resthopper.

1 Like

Hey Angel,
I just fixed this on compute with

I also added a bug for David to look at with respect to empty groups sticking around in definitions.
https://mcneel.myjetbrains.com/youtrack/issue/RH-59250

2 Likes

Yes, this is sort of by design, in that undoing a deletion of an object also needs to reinstate the group which contained it. But that’s probably not nearly as important as I thought it was when I decided to not clean up groups.

Probably if I put some elbow grease into this I can merge the group deletion undo into the same undo record as the object deletion.

1 Like