IfcOpenShell / IfcOpenShell

Open source IFC library and geometry engine
GNU Lesser General Public License v3.0
1.87k stars 733 forks source link

Use the type manager dropdown to change the type in the scene. #3707

Open theoryshaw opened 1 year ago

theoryshaw commented 1 year ago

Intuitively it feels like doing something like the following video should change the type in the scene.

That is, when a type is selected, you can use the type manager dropdown to change the type in the scene.

https://github.com/IfcOpenShell/IfcOpenShell/assets/507113/a45808d1-4dec-467d-9b6d-f660559048f0

Gorgious56 commented 1 year ago

I am personally not sure about this, since the goal of the type manager as far as I understand is to select and manage types for instanciation, not for managing existing individual instances. I would be fine with a button placed in the manager header to update the selected instance(s) to the type that is selected in the manager though.

I may have expectations based on how it works now though so maybe I'm biased towards keeping it that way. :)

myoualid commented 1 year ago

I'm also biased and got used to how things work. But maybe there's a middle ground:

Or vice versa

theoryshaw commented 1 year ago

BUT, In the Active Tool, the dropdown shows the type of the highlighted object + when you change, it changes the type of all selected objects

yes, was thinking something like this.

Moult commented 1 month ago

So there are a few major changes I'm working through here:

  1. Previously launching the type manager would auto close if you moved your mouse. Boo. We'll change it to a dialog to fix this.
  2. The type manager was a bit useless because you still had to choose the type via the (non-graphical) text only dropdown. Also Adding from the type manager had little use because it blocked the view anyway. I've now consolidated them so clicking the type launches the type manager, and clicking on a type in the grid icon view now changes the active type and closes it. This now becomes a much more fancier dropdown essentially.
  3. Adding a type had its own way of doing things separate to the assign class panel. I want to remove it and consolidate with a single way to add new objects. There really shouldn't be three ways with subtle differences to add new objects.
  4. There are a silly amount of buttons per icon in the icon grid which is a lot of clutter.
  5. The type manager's dropdown has different rules (shows all classes) different to the header, because it actually affects creating new types. This makes it useless to know exactly what types you have (which is the whole point of a type manager) so to use the manager properly you need to close it, check your types, then open it again :(

Ping @trhyder FYI ^

trhyder commented 1 month ago

Thanks for the ping.

It's good to hear this is getting some love. I had a look and here are my suggestions.

Screenshot 2024-09-23 at 11 37 09 AM Screenshot 2024-09-23 at 11 37 34 AM

Additionally, it would be great to access other fields like Profiles and Material Layer Sets from the Types Manager.

Moult commented 1 month ago

The two buttons at the bottom "Cancel" and "Add Type" (the text defaults to "OK", clicking it will execute "something") are a sort of necessary evil and I'd love ideas on how to improve it.

Basically Blender by default has a few different ways to pop things up. A regular popup has no "Cancel/OK" button at the bottom, but if you move your mouse away, it disappears and auto executes. This is really disturbing for both new and old users. A dialog popup doesn't have this "mouse movement" problem, but it does come with a "Cancel/OK" combo which we can't remove (but we can change the "OK" text to something else and control what it executes). So ideally we come up with an idea for those two buttons to make them meaningful.

In short as you probably already know Blender's interface doesn't encourage popup dialogs, so in the few areas where we use them, we need to use them carefully.

trhyder commented 1 month ago

Hey @Moult my PR https://github.com/IfcOpenShell/IfcOpenShell/pull/5500 got behind the work you had done. I would like to contribute more in this area. Below is a screen capture of what I had done, if you like any of it let me know and I'll create a new PR.

ScreenRecording2024-10-02at10 13 35PM-ezgif com-video-to-gif-converter (1)

Moult commented 1 month ago

@trhyder would it be easier if we organised a screenshare to go through the merge conflicts and try to set some boundaries to prevent future merge conflicts?

trhyder commented 1 month ago

@moult, do you see any problems addressing @theoryshaw 's initial idea - to use the Type Manager to change the ElementType of a selected object?

Moult commented 1 month ago

I think that's totally a fine idea, especially now that we have distinct add / edit UIs.