[BlenderBIM] IFC type thumbnails

edited July 2022 in General

Hi everyone!

I'm a old follower from the OSArch community, and recently I'm having a bit more time to delve into some things (namely Speckle, IFC.js and BlenderBIM). I'll talk about a variety of related topics, but ultimately I intend this post to collect community feedback for the BlenderBIM menu I've been working with.

Two weeks ago, there was this podcast in Spanish, in which they talked about BlenderBIM:
https://bimrras.com/episodio/111-10-razones-por-las-que-blender-es-un-buen-companero-de-viaje-bim/

I believe it's always positive to reach the audience, although in this case, there was also some general criticism, and the Blender interface was not very much appreciated. In parallel, there was a message from @Moult on Twitter that made me get hands on something!
https://twitter.com/BlenderBIM/status/1537429096044822528

Users are going to be scared! We need to change that! As I see things, we need to gravitate the speech towards "we have an awesome product", because we have! I believe it's fair to emphasize that fact while reminding it's still in alpha stage, and hence some features, UI redesigns and stability improvements are yet to come.

So from that Twitter conversation, I ended up trying to implement thumbnail previews for IFC type additions from the BIM tool within the 3D viewport toolbar. Here you can see it working:
https://twitter.com/cvillagrasa/status/1542180611191934976

What do you think of it as it is now? Would you change something on the UI? For now I've removed the Shift + A shortcut, should it trigger the popup with the preview as when clicking "Browse IFC Types"? What about the "Authoring" section on the 3D viewport sidebar? Should it be removed once the toolbar has the functionality?

For those interested in seeing the code, you can find it here:
https://github.com/cvillagrasa/IfcOpenShell/commit/7321138d576b801054c213a8ea55cd5ffc1b3c03

Thanks in advance!

Tagged:
vpajicbrunopostlebruno_perdigaotheoryshawcarlopavGorgious

Comments

  • I love it. I'm a bit confused about the Authoring section, so it is probably doing something that isn't obvious.

    Note that a single IFC project can have more than one IfcProjectLibrary, and that they can be nested within each other. This isn't exposed anywhere else in the blenderbim GUI yet, so it would be confusing to expose it here at first, but whatever you do here should be future compatible.

    cvillagrasatheoryshaw
  • Hmmm everything comes from the file object returned by blenderbim.tool.Ifc.get():
    https://github.com/cvillagrasa/IfcOpenShell/blob/7321138d576b801054c213a8ea55cd5ffc1b3c03/src/blenderbim/blenderbim/bim/module/model/data.py#L57-L66

    It looks to me that currently, the code deals with ONE IfcProjectLibrary (or any IFC file used as a library for the moment), but the library contents are loaded within the current file object:
    https://github.com/IfcOpenShell/IfcOpenShell/blob/8311983d5ec423cf71898e368b8e088c76707e1c/src/blenderbim/blenderbim/bim/module/project/operator.py#L85

    If I understand it correctly, an update on dealing with more than one library at a time would load all needed contents, and the current code for the selection of IFC Types would work straight away without requiring any additional change.

    But I have a lot of doubts on all of this, @Moult guidance will be needed here.

  • That looks awesome! Have you seen the Home Builder Addon? It has a great UI, maybe it's worth taking a look. Andrew released a beta version for Blender 3.0+ in his Discord channel. One of the things I like is that you have multiple thumbnails for each group.

    theoryshawCoenAceJesusbill
  • @cvillagrasa yes, currently blenderbim just shows all Type objects, ignoring any Project Libraries.
    At the moment you have a Class filter above the Type selector. I think that eventually this could be extended to have Project Library filters above the Class filter.

  • edited July 2022

    Agreed, awsome.
    Agree with @bruno_perdigao's suggestion as well, to visually see all the types under a particular IfcBuiltElementType category.
    I would remove the add button, and just click on (or double click) the thumbnail to add it. Maybe when you hover over the thumbnail, it shows a '+' or 'add' superimposed on it.

  • What about the "Authoring" section on the 3D viewport sidebar? Should it be removed once the toolbar has the functionality?

    Yes, when it doubt, remove. :)

    I actually think the stuff under architectural should not be buried under a drop-down menu

  • @bruno_perdigao said:
    That looks awesome! Have you seen the Home Builder Addon? It has a great UI, maybe it's worth taking a look. Andrew released a beta version for Blender 3.0+ in his Discord channel. One of the things I like is that you have multiple thumbnails for each group.

    Hi, I didn't knew Home Builder! It definitely looks like it's worth giving it a look, specially for that cartoonish thumbnails. They look much better than the default renders!

    @brunopostle said:
    @cvillagrasa yes, currently blenderbim just shows all Type objects, ignoring any Project Libraries.
    At the moment you have a Class filter above the Type selector. I think that eventually this could be extended to have Project Library filters above the Class filter.

    That's a very good idea! I guess that if loading of multiple IfcProjectLibrary is not yet supported, there must be something non-trivial with cross-referenced links or something else I'm missing. But once that's done, it would just be need to store the source library within the BIMObjectProperties of the Blender objects, or maybe within the AuthoringData dictionary, and then the filter by library could be added.

    @theoryshaw said:
    Agreed, awsome.
    Agree with @bruno_perdigao's suggestion as well, to visually see all the types under a particular IfcBuiltElementType category.
    I would remove the add button, and just click on (or double click) the thumbnail to add it. Maybe when you hover over the thumbnail, it shows a '+' or 'add' superimposed on it.

    Yeah, I think that could work better. Purely from an aesthetic standpoint, I preferred the previous version to the one with a single preview:
    https://twitter.com/cvillagrasa/status/1541673130145587200

    Maybe a single filter by class as you suggest is the way to have a nice menu, while not overloading the screen on big projects. As for the mouse events, I'll have to do some research. From what I see at first glance, it can be tricky with the MVC architecture of Blender.

    @theoryshaw said:

    What about the "Authoring" section on the 3D viewport sidebar? Should it be removed once the toolbar has the functionality?

    Yes, when it doubt, remove. :)

    I actually think the stuff under architectural should not be buried under a drop-down menu

    Yeah well, but I didn't add it myself! so I'd rather ask first, since I see this might trigger some redesign of what's on the toolbar (T) and what's on the sidebar (N).

  • Very nice stuff !
    I'm eager to see where this leads to. However I would not remove the SHIFT + A shortcut altogether, it's really convenient to add multiple instances of a type whereas this method needs at least 2 clicks. Thinking about carpal tunnel syndrome :)

  • @Gorgious said:
    Very nice stuff !
    I'm eager to see where this leads to. However I would not remove the SHIFT + A shortcut altogether, it's really convenient to add multiple instances of a type whereas this method needs at least 2 clicks. Thinking about carpal tunnel syndrome :)

    Yeah, that's undoubtedly a fair point. Maybe it's worth to keep the selected class/type as labels, in the place of the EnumProperties in the current BlenderBIM. That way you'd know which instances you're adding with SHIFT + A, while at the same time it'll be always possible to show the pop-up menu with the previews, in order to change the selection.

    It will still be one more click to change selection, but I guess that's the only way without always showing the preview on the header panel. Any other thoughts on this?

  • @cvillagrasa said:
    Hi, I didn't knew Home Builder!

    You might appreciate this list on the wiki of CAD/BIM/AEC related Add-ins
    https://wiki.osarch.org/index.php?title=Category:Blender_Add-on

    cvillagrasa
  • Some updates on this topic!
    https://twitter.com/cvillagrasa/status/1546022717526360065

    Code here:
    https://github.com/cvillagrasa/IfcOpenShell/commit/618bed38890c3a172ebd0a591763bd3dfd1ac2c1

    Now I like it a bit more! ?

    What's still missing? I should try to run some tests... also, I've found that if you change menus very quickly, it can happen that some previews are not created, I should make the logic more robust. Also, sometimes I'm having some Blender RNA warnings which I don't really know where are coming from... and some other small things.

    What do you think of this version as it is? @Moult suggested to make paginated 3x3 grids for the single dropdown version, but with the cascading dropdown option, and the searcheable props from @Gorgious, maybe it is way too much? Also, it can feel pretty empty when for some reason there's only one relating type.

    As for the click events suggested by @theoryshaw, for now I haven't researched it more, but I have a feeling that Blender is not really designed for click events on thumbnails...

    What do you think of the help panel? It is small and could be placed in a lot of other places as a means of contextual documentation. It doesn't have the best formatting, text is not justified, etc. but even like that, it can be useful, right?

    AcetlangcarlopavvpajicGorgious
Sign In or Register to comment.