This reverts commit 7828508179.
Turned out when I was assuming `bim.add_style` is assigning the style but it wasn't, it was `bim.update_representation` on the file save. So basically during the session style wasn't assigned, therefore I added back explicit style assignment. 😬
because pset wasn't removed BBIM was recognizing those elements as parts of an array resulting in issues during deletion and duplication. This issue is a regression after ec4f0e5, the root problem was that `keep_objs` wasn't working with `sync_children`.
Since `keep_objs` was used only for applying array layers I've replaced it with `array_layers_to_apply` that works for both `sync_children` = True and False.
https://community.osarch.org/discussion/1831/duplicating-failed-for-array-items-after-apply-array
Minor fixes to use view_layer.object.active etc instead of context.active_object when running via Blender UI (it seems when you run the patch recipe from the Blender UI at least in later versions, context does not have an "active_object" property.
it's very limited and covering very little cases now. It works only for IfcPolygonalFaceSets representations that consists of triangles.
Short example - https://imgur.com/a/1AxunSN
- fixed a typo in bim.select_by_style
- added note to clarify what Shade/Render/Texture/Lighting/etc buttons do and moved style selection block at the beggining (maybe it's just me but when edit buttons are above selection ui it seemed like they affect all the styles somehow, not just the currently active one), so it will be more intuitive
Before:
https://i.imgur.com/jRSTLGI.png
After:
https://i.imgur.com/8ih4qSX.png
Now you can set UV mode that will be used to sample textures (previously it was always using UV data on geometry or breaking if it was otherwise). Basically now you can use autogenerated UV for the objects without UV.
https://i.imgur.com/WtYdpmU.png
Removed BIMMaterialProperties.ifc_coordinate_id as it was only used during the ifc_import and maintained by the `Loader.create_surface_style_with_textures` which is also used to update live shader graph that not always have specific IFC id for the UV.
Warning is:
/usr/lib64/python3.12/site-packages/ifcopenshell/api/project/create_file.py:61:
DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version.
Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).