Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy way to create a new ifc material at typical dropdowns #3452

Closed
theoryshaw opened this issue Jul 14, 2023 · 4 comments
Closed

Easy way to create a new ifc material at typical dropdowns #3452

theoryshaw opened this issue Jul 14, 2023 · 4 comments
Labels

Comments

@theoryshaw
Copy link
Member

Would be nice, anywhere this material dropdown occurs, that there's a button to create a new IFC material as well.

2023-07-14_16-11-52_Blender_blender

@Gorgious56
Copy link
Contributor

This is a general purpose popup panel that is displayed every time the number of potential items in an enumerator is > 10.

def prop_with_search(layout, data, prop_name, **kwargs):
# kwargs are layout.prop arguments (text, icon, etc.)
row = layout.row(align=True)
row.prop(data, prop_name, **kwargs)
try:
if len(get_enum_items(data, prop_name)) > 10:
# Magick courtesy of https://blender.stackexchange.com/a/203443/86891
row.context_pointer_set(name="data", data=data)
op = row.operator("bim.enum_property_search", text="", icon="VIEWZOOM")
op.prop_name = prop_name
except TypeError: # Prop is not iterable
pass

I don't think it's a good idea to add functionality to this panel since it's already a very hacky feature (my own creation, not my proudest achievement :p).

So maybe we can brainstorm how to add this feature gracefully. Just so I understand, you want to be able to add a new MaterialLayerSet with a new IfcMaterial using a single click in this interface ? Because right now, you can add a new MaterialLayerSet but you have to use an existing material, and then you have to click several times in the interface to be able to change the underlying IfcMaterial ?

@theoryshaw
Copy link
Member Author

Just so I understand, you want to be able to add a new MaterialLayerSet with a new IfcMaterial using a single click in this interface?

Correct.

But also from other areas where this material search pops up...

That is, to create a new IfcMaterial when in the following modes as well...
image

@Moult
Copy link
Contributor

Moult commented Jul 21, 2023

I think let's hold off from investigating this further until the new material and styles UI is designed.

@Moult
Copy link
Contributor

Moult commented Sep 9, 2024

Closing because you can now easily create new materials, and the material manager is directly below object material assignments.

@Moult Moult closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants