Commit Graph

2501 Commits

Author SHA1 Message Date
Massimo Fabbro eb225070d3 Add toggle space visibiity button into spatial tool menu 2024-04-15 13:03:01 +02:00
Andrej730 2ac74fb535 refactor with SKIP_SAVE option on operator props
Co-Authored-By: Gorgious56 <25156105+Gorgious56@users.noreply.github.com>
2024-04-15 13:03:00 +02:00
Andrej730 89146ea046 More options to save .ifc as relative path in blender 2024-04-15 13:03:00 +02:00
Andrej730 7f10eaa14f Fixed tests after a4a6dce 2024-04-15 13:03:00 +02:00
Andrej730 4d3ed81971 Fixed test after b035129 2024-04-15 13:03:00 +02:00
Andrej730 5e019bbc42 Fixed test after c8c0c9a
Taking into account that now we have error messages if user will try to remove the last material layer which would make layer set invalid ifc.

FAILED test/bim/test_feature.py::test_remove_material_set_layer - AssertionError: Failed to run operator bpy.ops.bim.remove_layer(layer=IfcStore.get_file().by_id(93).MaterialLayers[...
2024-04-15 13:03:00 +02:00
Andrej730 765d52d4e1 Fixed missing ifc file in api call after 28cc168
Some bim test was failing because of it

FAILED test/bim/test_feature.py::test_assign_material__material_profile_set - AssertionError: No material Default found in profiled materials: []
2024-04-15 13:03:00 +02:00
Andrej730 07401c4b1c Fixed void tests after d3d2c36 2024-04-15 13:03:00 +02:00
Andrej730 0f206fe709 Fixing test after 1c12a98
FAILED test/bim/test_feature.py::test_export_ifc__with_basic_contents_and_saving_as_a_relative_path - AssertionError: Value is C:\IfcOpenShell\src\blenderbim\test\files\temp\export.ifc
2024-04-15 13:03:00 +02:00
Andrej730 3a0d09a6dc Small fix related to 5c2ae98c0 and a bit more descriptive operator error
FAILED test/bim/test_feature.py::test_create_project__ifc2x3 - AssertionError: Failed to run operator bpy.ops.bim.create_project
2024-04-15 13:03:00 +02:00
Andrej730 5397b95df5 Fixing collections tests related to 99d9c0f5b
FAILED test/bim/test_feature.py::test_remove_drawing - AssertionError: The collection "IfcGroup/PLAN_VIEW" does not exist
2024-04-15 13:03:00 +02:00
Bruno Postle 489436449c BlenderBIM push Git tags to remote
Shows error message if push fails
2024-04-15 13:03:00 +02:00
Andrej730 a7283ca538 Fixed duplicated objects collections issue after 586707dd2
Duplicated objects were not able to have their own collection after 586707dd2

Also fixed bim test
FAILED test/bim/test_feature.py::test_copy_a_storey - AssertionError: assert 'IfcBuildingStorey/My Storey.001' in ['IfcBuildingStorey/My Storey']
2024-04-15 13:03:00 +02:00
Andrej730 6b0200e1f0 Preserving original name on unlinking
Unlinking was using copied object name for the unlinked object instead of the original one.
So it worked like Cube -> IfcWall/Cube -> Cube.001 and bim test was failing:
FAILED test/bim/test_feature.py::test_unlink_object - AssertionError: The object "Cube" does not exist
2024-04-15 13:03:00 +02:00
Andrej730 f45e3b99ca Fixed couple bugs in test_feature
1) Explicitly set empty ifc project not to load demo library - was still loading because it was using my default scene which caused errors.
2) typo in dimension check assertion message
2024-04-15 13:03:00 +02:00
Andrej730 787f9cd7be Fixing collectors tests after 1f43ec8 2024-04-15 13:03:00 +02:00
Andrej730 ea9457a49f Fixing tool tests 2024-04-15 13:03:00 +02:00
Andrej730 664d0e0fa6 Fixing core tests 2024-04-15 13:03:00 +02:00
Andrej730 f4067abc42 Fixed import error with filtering out IfcGrid's spatial element #3283
Fixed error that was occuring if you try to import .ifc file where spatial element contains only grid and will use advanced mode, filter mode = "IFC Class" and check "Filter Spatial Elements".

Error occured because spatial element was filtered out but then when ifc grid was created and importer to find a spatial element based collection for the grid it couldn't find it.

Traceback:
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 595, in execute
    ifc_importer.execute()
  File "\blenderbim\bim\import_ifc.py", line 260, in execute
    self.place_objects_in_collections()
  File "\blenderbim\bim\import_ifc.py", line 1494, in place_objects_in_collections
    self.place_object_in_collection(self.file.by_id(ifc_definition_id), obj)
  File "\blenderbim\bim\import_ifc.py", line 1498, in place_object_in_collection
    self.place_object_in_decomposition_collection(element, obj)
  File "\blenderbim\bim\import_ifc.py", line 1517, in place_object_in_decomposition_collection
    return self.place_object_in_spatial_decomposition_collection(element, obj)
  File "\blenderbim\bim\import_ifc.py", line 1545, in place_object_in_spatial_decomposition_collection
    self.collections[container.GlobalId].children.link(grid_collection)
KeyError: '33AiKftFj2aAf2MqQr5Gs7'
2024-04-15 13:03:00 +02:00
Andrej730 ae44957464 Fixed getting filtered spatial elements at import for ifc2x3 #3283
In ifc2x3 IfcProject is not IfcContext because there is no IfcContext in ifc2x3 and it was causing the error below on .ifc import with filtered spatial elements.
Also added small refactor

Traceback:
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 595, in execute
    ifc_importer.execute()
  File "\blenderbim\bim\import_ifc.py", line 253, in execute
    self.create_spatial_elements()
  File "\blenderbim\bim\import_ifc.py", line 688, in create_spatial_elements
    self.create_generic_elements(self.spatial_elements)
  File "\blenderbim\bim\import_ifc.py", line 698, in create_generic_elements
    products = self.create_products(elements)
  File "\blenderbim\bim\import_ifc.py", line 717, in create_products
    iterator = ifcopenshell.geom.iterator(settings, self.file, multiprocessing.cpu_count(), include=products)
  File "\blenderbim\libs\site\packages\ifcopenshell\geom\main.py", line 99, in __init__
    raise ValueError("include and exclude need to be an aggregate of IfcProduct?")
ValueError: include and exclude need to be an aggregate of IfcProduct?
2024-04-15 13:03:00 +02:00
Andrej730 17ee5e6f43 Getting shader graph nodes by type rather than name #3316
Because relying on names doesn't work for non english users
2024-04-15 12:04:44 +02:00
Andrej730 e52e9d4ac0 Fixed error on disabling editing window 2024-04-15 12:04:44 +02:00
Andrej730 3e0adb8dfd Added button to update current style #3293
Example - https://i.imgur.com/f4Yi3MR.png
Now changing style type should be a bit more intuitive - previously there were no button and it wasn't possible to change style type for all selected objects / changing style type for the entire scene were hidden in N-panel Miscellaneous section.

Now it also able to change style type for all blender materials, even the ones that don't have any objects using them (wasn't possible before 7c0c934b4)
2024-04-15 12:04:44 +02:00
Bruno Postle d15f7cf88e BlenderBIM Git merge asymmetry heuristic (#3096)
`ifcmerge` is asymmetrical. When both branches have new entities, either
local or remote step Ids need to be renumbered to resolve the merge
conflict.

If the remote branch is 'origin/main' or 'main' we preserve remote Ids,
otherwise we preserve local Ids.

This should support a workflow where a local 'main' branch is kept
pristine, but other local branches are treated as disposable; it should
also support a workflow where multiple authors access a shared 'origin'.
2024-04-15 12:04:44 +02:00
Dion Moult 35a346e412 Document two answers to frequently reported bugs: missing numpy and blend / ifc out of sync. 2024-04-15 12:04:43 +02:00
Dion Moult ef98bd5120 Convert Ifc2Sql script to IfcPatch recipe and add geometry support 2024-04-15 12:04:43 +02:00
Dion Moult 816efc8810 Fetch pset and qto names via pset data instead of real time to prevent UI lag on larger models. 2024-04-15 12:04:43 +02:00
Dion Moult 0e02c97fc6 Lazily check for BBIM_Railing psets to prevent unnecessarily fetching psets for every element when loading models. 2024-04-15 12:04:43 +02:00
Sigma Dimensions e17b9fa111 enable activating object type when trying to select type from an object ( whilst the type is hidden from view layer) 2024-04-15 11:44:56 +02:00
Massimo Fabbro 240f9b0100 Now generate spaces from walls considers also columns in order to create the contours 2024-04-15 11:44:56 +02:00
Sigma Dimensions 8a108627e4 temporarily hide IFC Spatial Manager for IFC2X3 models 2024-04-15 11:44:56 +02:00
Sigma Dimensions 62b5f080ab Enable selecting group elements 2024-04-15 11:44:56 +02:00
Sigma Dimensions 2b4c21615b Enable selecting a container's children from the IFC Spatial Manager panel 2024-04-15 11:44:56 +02:00
Sigma Dimensions c280bfa7ae fix replacing material with material profile 2024-04-15 11:44:56 +02:00
Sigma Dimensions ab19c9ff46 experimental patch of non parametric mep segments 2024-04-15 11:44:56 +02:00
Sigma Dimensions da41469c43 fix missing import 2024-04-15 11:44:55 +02:00
Sigma Dimensions ee0dca4898 Move Spatial Manager UI to "IFC Project Set-up" 2024-04-15 11:44:55 +02:00
Sigma Dimensions 2cf50dc48f split material assign/unassign operators into tool and core 2024-04-15 11:44:55 +02:00
Sigma Dimensions 5ce156bfa9 fix delete material operator 2024-04-15 11:44:55 +02:00
Sigma Dimensions a38784cdc4 Fix displaying connections for selected distribution ports 2024-04-15 11:44:55 +02:00
Sigma Dimensions 0959a7f6a3 Refactor and re-use common spatial_tool.select_products 2024-04-15 11:44:55 +02:00
Andrej730 a7faa3ec3e Support external shaders from currently opened blend file
Previously it was crashing if you try use shader from current .blend file as external.
I guess we now kind of support external internal shaders 🙃
2024-04-15 11:44:55 +02:00
Andrej730 00a87819e4 switch to external styles for rendered shading in viewport
Unfortunately I couldn't find a way to make it work with areas that user created during current blender session. But new areas will have this feature too after blender restart
2024-04-15 11:44:55 +02:00
Andrej730 70eaa1a7df prioritize external styles on ifc import
also found a way to switch shade graph for two materials without juggling active materials and active objects - it was necessary to make it work on import without adding temporary active object
2024-04-15 11:44:55 +02:00
Bruno Postle 4318cec65a BBIM show all fetched remote Git branches (#3096) 2024-04-15 11:44:55 +02:00
Gorgious eb35157f8f Fix #3142 : Use Tab hotkey to edit horizontally layered objects 2024-04-15 11:44:55 +02:00
Bruno Postle c07cb2141e BlenderBIM operator to add remote repo (#3096)
Procedure to merge a pull request would be: Add Remote, select the added
remote in the pull-down, Fetch from remote, select the added remote
branch in the pull-down, Merge, delete remote
2024-04-15 11:44:55 +02:00
Dion Moult ada978ed1f Toggle between full schema (i.e. all tables for every declaration) and partial schema dump into SQL 2024-04-15 11:44:55 +02:00
Bruno Postle 84cd96a48d BlenderBIM operator to delete a Git remote (#3096) 2024-04-15 11:44:55 +02:00
Bruno Postle 567ad3bf63 BlenderBIM fix warning writing .git/config (#3096) 2024-04-15 11:44:55 +02:00