Materials not remembering their assigment.
I'm trying to do the following:
https://www.dropbox.com/scl/fi/37q0bocb7vxyyuy8oxqz2/2023-08-20_22-04-05_Blender_blender.mp4?rlkey=1rzhfna8gnubj5eo8r6j9pa7z&dl=0
.. but as you can see it doesn't remember the assigned materials upon reopening of the IFC file.
Am I missing something?
Comments
hands down the coolest bug report demo I've seen given the background music ?
It's a bug. Basically, one of the assumptions made especially with the current UI is that surface materials only apply to a single body representation. Unfortunately to properly address this, this also involves quite a bit of rework to redesign a new materials UI. I don't think that'll make it in this release cycle seeing as it's a significant bit of work (but should address quite a lot of material / style issues).
For me it doesn't save material assignments if you just save the project but
bim.update_representation
helps (which is the same thing as "Manually Save Representation") to force it to save the assigned materials - https://github.com/IfcOpenShell/IfcOpenShell/assets/9417531/899d89dc-6fa7-4d16-8ad4-038148d72237Am I missing something, can someone else try to reproduce this?
@Andrej730 ha!.. All them Witches... a good band!
https://open.spotify.com/artist/29Wmfm1CojrjQ3aQP0FI65?si=9toGCigbS7WKOP19Wyq3GA
@theoryshaw can you try to reload this .ifc to blender and try it again? If it'll work then there is something about the particular blender session
Yeah, unfortunately that doesn't work.
Okay, I think I've managed to narrow it down - the only times it worked fine when you had N materials and mesh has used all materials starting from the first material slot to some other without skipping materials in between. For example, you had 5 materials and 1-3 were used (if 1,2,4 were used then 4th material would be saved as the 3rd).
@theoryshaw can you please try after this commit? Works fine for me.
That worked!
Thanks @Andrej730