Nice, I used these the other day and it worked well.
In my purpose Alphabetical sorting of the Named Selections would have helped.
i did notice when i copied the objects it duplicated the Named Selection (fine, but should probably be optional) but if copied to a new project they did not.
There is also no way to add or remove to a Named Selection. If in an attempt to add an object then save as the same name it allows 2 Named Selections of the same name, vs replacing.
Looking forward to using this tool as it progress! Thanks
Hi @Trav, I tested it, it is very nice. One question: are you using ETO to build this? If yes, did you manually hook up all RhinoObject events like Alt+Gumball Drag, or Ctrl+C/Ctrl+V?
Yes, all ETO (treegrid) / RhinoCommon. There are event watchers that look for Add/Delete objects along with some user data for tracking which new or deleted objects belonged to which selections.
It will be a nice addition to Rhino for sure and will come handy in many scenarios.
I have just briefly tested it and here is some initial feedback (some of it was mentioned here already)
Clicking on name instantly loads the selection - it’s quick and nice but for example there is no way to pick a selection just to rename it without actually triggering the selection. Maybe there should be an icon to actually load the selection from the highlighted ones? Kind of like “Restore” icon in NamedViews.
Optionally maybe a key combo like Ctrl+LMB Click would load it instantly?
To make it robust we’ll need the ability to sort by name and also manually move each up/down the list
As mentioned above, there is no way to overwrite the selection with different set of objects - it just now creates a new set with the same name. I think it would be better to allow only unique names and have prompt if trying to overwrite an existing one.
Currently just expanding the selection tree to see the object types unselects everything. A bug I guess?
A bit more advanced wish but it would make this feature very powerful: ability to “Boolean” the selections: use the saved sets to add/substract/intersect with existing selection.
In Photoshop for example it is implemented like this:
Ctrl+LMB just loads the selection
Ctrl+Shift+LMB : Adds to existing selection
Ctrl+Alt+LMB : Substracts from existing selection
Ctrl+Shift+Alt+LMB : selection “intersection” (only objects in both current and new set)
This could work both by clicking on single named selection, or if multiple are highlighted the same key combo on the “Load Selection” icon from # 1.
( actually perhaps there could be icons for each of these actions (load, add, substract, intersect) apart from the key combos, to make it more discoverable and allow this with multiple saved selections highlighted at once?
Do you have the ViewModel for this TreeGrid? If yes, not sure if you have experienced with the issue that I am facing:
I have the a TreeGridItemCollection in ViewModel for TreeGrid’s DataStore, but somehow adding items to TreeGridItemCollection does not trigger TreeGrid to load the new data. I was using GridView before switching to TreeView, it works all fine when adding/removing items.
I have to do additional treeGrid.DataStore = treeGrid.DataStore to hard reload the treeGrid.DataStore after all items are added to TreeGridItemCollection.
@mingo1214 Are you binding the tree grids data store to a view model or just using control events?
Something like tree_grid_view.Bind(c => c.DataStore, ViewModel, m => m.TreeGridCollection); works nicely.
@Jarek thanks for the nice write up. There are some glitchy UI behaviors that need cleaned up before release for sure. The optional stuff all sounds like fun and should go on the request pile as well. Thanks!
Thanks @Trav, for some reasons this tree_grid_view.Bind(c => c.DataStore, ViewModel, m => m.TreeGridCollection) doesn’t work for me.
I have to manually hook up the ReloadData with CollectionChanged: viewModel.TreeGridCollection.CollectionChanged += (s, e) => { tree_grid_view.ReloadData(); };
Thanks @Trav for looking into this. #5 is definitely optional but would make it a very powerful toolset; the other ones are basic usability problems/glitches.
What you have it a great idea and a proof of concept at this stage, I hope it can be made into a fully functional tool.
We saw this with SnapShots in V6 where great idea was taken half-way only and is still unusable (file bloat issue). Fingers crossed for NamedSelections that you can help to avoid that fate
Thanks @Trav, so this works when create a new TreeGridCollection object and set to viewModel.TreeGridCollection property, and the TreeGrid is notified to reload.
However, TreeGrid doesn’t update on any changes on items of TreeGridCollection, like Add()/AddRange()/Remove() etc.
Thanks this does the trick.
So this means I have to wrap up TreeGridCollection’s Add/Remove etc methods within ViewModel to be able to raise the property change event. Does this mean it is an issue in TreeGridCollection?