Skip to content

v0.3.2

Latest

Choose a tag to compare

@CyrilWaechter CyrilWaechter released this 15 Sep 07:27

v0.3.2

Fixes styling of materials pushed into an open Bonsai model, and gives
colour-less materials a colour from a category scheme.

Pushed materials now show their colour

  • Styles are actually applied. The add-on passed an IfcColourRgb entity
    where ifcopenshell expects a dict, so style.add_surface_style always
    raised inside a swallowed except and no colour was ever applied.
  • No more invalid styles. The style is now built in one shot; a
    mid-way failure could previously leave an IfcSurfaceStyle with
    Styles=$ (invalid IFC4 SET [1:?]), which was then re-used and could
    crash ifcopenshell's style loader on the next model open.
  • Re-used materials get styled too. Materials already present in the
    model (found by their materialsdb identity) were never styled when a push
    re-used them. Third-party styles are preserved; only ours are refreshed.
  • Bonsai viewport. Styles added to an already-open model are now
    registered as Blender materials (created, linked, coloured) like an
    import would, so layer walls display their colours and the style editor
    no longer fails on the missing material.

Category colour schemes

  • Surface styles keep the producer colour when a material defines one
    (color <int>); otherwise they take the colour of their category from a
    named scheme — default Lesosai (category <Category>,
    material_builder.SCHEMES).
  • IfcColourRgb components are normalised to 0–1 (they were written as
    0–255). Construction exports now style their materials as well.

Full changelog: v0.3.1...v0.3.2