Commit Graph

3391 Commits

Author SHA1 Message Date
Andrej730 4e71671412 test creating surface style without IFC entities 2024-04-16 11:09:28 +02:00
Andrej730 e98d7ed89c BBIM Shader Graph Settings - setting uv mode for the textures
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.
2024-04-16 11:09:28 +02:00
Andrej730 3aa3b329c7 Fixed issue updating texture style for non-faceset representations 2024-04-16 11:09:28 +02:00
Dion Moult bc04a65109 Fix #4027. Fix regression where S-D or A-D hotkeys didn't follow vanilla Blender behaviour from 81a1bd9 2024-04-16 11:09:24 +02:00
Bruno Postle c846edd896 Revert 1d972a6 as no datetime.UTC on CI server 2024-04-16 11:09:24 +02:00
Bruno Postle 98cba98f7d fix python 3.12 utcnow() deprecation warning
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).
2024-04-16 11:09:24 +02:00
Gorgious56 50561d72b8 You can now select the same ifc classes and match predefined types with SHIFT + Clicking the "Select Ifc Class" button 2024-04-16 11:05:27 +02:00
Dion Moult 847f0890e0 Fix #3691. Add toggle for power users to disable the BIM toolbar if an IFC isn't loaded. 2024-04-16 11:05:27 +02:00
Dion Moult f1b59ee583 New style manager supports basic editing of externally defined surface styles 2024-04-16 11:05:27 +02:00
Dion Moult f2e56f8128 Minor fix to "select multiple IFC class" implementation 2024-04-16 11:05:27 +02:00
Dion Moult a18cd0eeab IfcFM panel now autodetects available engines with names and descriptions 2024-04-16 11:05:27 +02:00
Ryan Schultz d49fb90320 Select all objects from multiple selected classes 2024-04-16 11:05:27 +02:00
Andrej730 86f0af030a fill userdefined type field during reassigning IFC class #4034
to avoid confusion
2024-04-16 11:05:27 +02:00
Andrej730 d5253a8cbf store path to bcf in Blender file to reaccess it on Blender restart
Previously it was throwing errors if load .bcf and then restart Blender, since it was just trying to reaccess file in BcfStore.bcfxml which is gone after Blender restart. Now we store filepath to bcf in Blender properties to reload it after Blender restart.

Removed BCFProperties.is_loaded as it won't be possible to rely on it after Blender restart - after restart it will still indicate that file is loaded and it won't be possible to change it from .poll and .draw if file is gone.
2024-04-16 11:05:27 +02:00
Dion Moult b84cb72e1d New graphical element filtering UI for drawing filters that lets you also use saved searches. 2024-04-16 11:05:27 +02:00
Dion Moult 10a4fcfa10 If there is a Blender offset, show the non-offset placement in the placement panel 2024-04-16 11:05:27 +02:00
Dion Moult eaf939070b Fix bug when loading IFC with unsupported reflectance method (even though we don't fully support them yet) 2024-04-16 11:05:27 +02:00
Dion Moult 3e36e87311 Move georeferencing calculator panel until scene georeferencing panel.
Slowly all the N sidebar panels should be moved away.
2024-04-16 11:05:27 +02:00
Andrej730 b369c5e06e BCF Viewpoint - clear selection before hiding IfcSpaces #4031 2024-04-16 11:05:27 +02:00
Dion Moult 1dd401d77e Fix critical georeferencing autodetection regression due to refactor of new context filters. 2024-04-16 11:05:27 +02:00
Dion Moult b20f0dd199 Improve geometry guessing to also check placements of random sample of elements (not just site and building), not just geometry 2024-04-16 11:05:27 +02:00
Andrej730 4fba7461c2 Fixed more overlooked context overrides... #3876 2024-04-16 11:05:26 +02:00
Andrej730 ffce41be95 Fixed #4026 related to #3876 2024-04-16 11:05:26 +02:00
Andrej730 581014a1d5 Move code using ui index from data to ui #4028
As UI indices changes doesn't trigger data.py updates and information on screen is not synced with the active item anymore.
2024-04-16 11:05:26 +02:00
Dion Moult 990611c160 Add support for loading nested elements and consider nesting for indirect spatial containment. 2024-04-16 11:05:26 +02:00
Dion Moult 6e97ef66a1 Don't unnecessarily merge materials which can be very computationally consuming on file loads (e.g. from software like Solidworks) which will be made redundant now that a new materials/style management system is WIP. 2024-04-16 11:05:26 +02:00
Bruno Postle 9483835356 IfcGit.load_project() can be used to refresh scene
If no file path is given, clear blender objects and regenerate
the scene from the current ifc project in IfcStore
2024-04-16 11:05:26 +02:00
Massimo Fabbro 44b625bf24 fix #4011. More precise IfcRoof qto calculator 2024-04-16 11:05:26 +02:00
Massimo Fabbro 63636e1cc7 Minor fix 2024-04-16 11:05:26 +02:00
Massimo Fabbro 4b3a49dc3b Covering Tool: fixed bug if the project is defined in units different from SI units 2024-04-16 11:05:26 +02:00
Andrej730 1c002c6845 minor fixes
- error in settings poll message for bim.assign_selected_as_product
- test that drawing.assign_product won't create new assignments for the same product
2024-04-16 11:05:26 +02:00
Andrej730 d56ec42905 minor fix - clean up after debug 2024-04-16 11:05:26 +02:00
Andrej730 bf943951c1 Tests for connecting mep elements and regenerating them
Also:
- fixed bug with bim.mep_connect_elements not considering actual blender blender object's position
- moved syncing ifc position with blender object position to tools (sync_object_ifc_position)
- fixed a bug in adding a bend that occured if either any of the start/end points of the start/end segments matched - in that case one of the segments end up not connected to the bend
2024-04-16 11:05:26 +02:00
Andrej730 891e4d93a7 Fixed error importing .ifc that has element aggregated by ifcproject
In case if some element (not another aggregate) was aggregated by IfcProject directly, importing IFC was resulting in error below since the project's collection was never added to `self.collections`.

Traceback:
```
  File "\scripts\addons\blenderbim\bim\module\project\operator.py", line 732, in execute
    ifc_importer.execute()
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 292, in execute
    self.place_objects_in_collections()
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1668, in place_objects_in_collections
    self.place_object_in_collection(self.file.by_id(ifc_definition_id), obj)
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1672, in place_object_in_collection
    self.place_object_in_decomposition_collection(element, obj)
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1689, in place_object_in_decomposition_collection
    return self.collections[aggregate.GlobalId].objects.link(obj)
KeyError: '2bKVb8E7L6e89EQYJUk8BM'
```
2024-04-16 11:05:26 +02:00
Andrej730 485f654f93 Assigning product from selected objects #4015 2024-04-16 11:05:26 +02:00
Andrej730 0cc337fa88 fixed issue adding bend between segments located at the same point
also added some tests
2024-04-16 11:05:26 +02:00
Andrej730 036a670910 Fixed issue with UI for types withotu PredefinedType after 1621449
Noticed the issue adding IfcFurnitureType in IFC2x3

```
Traceback (most recent call last):
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\workspace.py", line 71, in draw_settings
    BimToolUI.draw(context, layout, ifc_element_type="all")
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\workspace.py", line 230, in draw
    AuthoringData.load(ifc_element_type)
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\data.py", line 56, in load
    cls.data["predefined_type"] = cls.predefined_type()
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\data.py", line 258, in predefined_type
    predefined_type = relating_type.PredefinedType
  File "\Blender\4.0\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 191, in __getattr__
    raise AttributeError(
AttributeError: entity instance of type 'IFC2X3.IfcFurnitureType' has no attribute 'PredefinedType'
```
2024-04-16 11:05:26 +02:00
Andrej730 e1246e257a New context override method for setting viewport tools #3876 2024-04-16 11:05:26 +02:00
Andrej730 4f76df8cb1 DumpSlabPlaner.change_thickness to use si units #4004
It was providing project units to `geometry.add_slab_representation` resulting and then they were converted to project units once again during `geometry.add_slab_representation`.
2024-04-16 11:05:26 +02:00
Andrej730 3d5b9f5e90 black format 2024-04-16 11:05:26 +02:00
Andrej730 db7dc86cd1 Merge two Services sections in Services and Systems tab #4001
Two similar sections were needed in the old ui before we added tabs
2024-04-16 11:05:26 +02:00
Ryan Schultz 65859a8f83 closes #4006: automatically update the geometry of all the objects that have 'similar openings'. 2024-04-16 11:05:26 +02:00
Ryan Schultz 8eef2392da fixes #3908: Close the opening (bim.edit_openings) while having the opening selected 2024-04-16 11:05:26 +02:00
Massimo Fabbro 6e6402e07f Covering Tool now it is possible to add ceiling coverings from selected walls 2024-04-16 11:05:26 +02:00
Andrej730 6140e67702 show mep regenerate and connecte elements for non-profile based elements 2024-04-16 11:05:26 +02:00
Andrej730 6cf1f8f49f fixed issues with ports ui on undo
data.py doesn't update on every undo, so passed blender objects got invalidated on undo resulting in errors. changed blender objects to blender object names
2024-04-16 11:05:25 +02:00
Andrej730 fd69d91776 UI for assigning controls to flow elements #3981
Example - https://imgur.com/a/CZQIoHp
2024-04-16 11:05:25 +02:00
Andrej730 61e5533598 tool.System.add_ports tests 2024-04-16 11:05:25 +02:00
Andrej730 4264b19fd8 fixed issue placing ports on a bend if start segment is bending using Z- 2024-04-16 11:05:25 +02:00
Andrej730 c2c2c4815f fixed issue in add_ports mutating object's matrix
inherently modifying ports positions in some cases
2024-04-16 11:05:25 +02:00