Commit Graph

8656 Commits

Author SHA1 Message Date
Gorgious56 7aab0ccfd7 Fix Ifc modifier error after #3393064 because of legacy context.object
For some reason in the scene properties context.object returns None even if an object is active  in the viewport, so ifc modifiers would randomly throw errors. AFAIK functionally they are supposed to point to the same thing, but active_object seems to be the superior one and context.object deprecated and kept for legacy reasons. Couldn't find dev quote but I'm sure I saw it at some point
2024-04-16 10:05:49 +02:00
Gorgious56 79e67c3f12 Ensure positive extrusion depth
This prevents an error and mesh corruption when trying to input a negative extrusion depth
2024-04-16 10:05:49 +02:00
Dion Moult 139b124ccb Move all modifier panels into Representations and Materials tab. 2024-04-16 10:05:49 +02:00
ay-ex 6ead57abd2 fix choco_update action
fix according to upstream makefile change: 
https://github.com/blender/blender/blob/main/build_files/cmake/Modules/FindPythonLibsUnix.cmake
2024-04-16 10:05:49 +02:00
Andrej730 f01f659fa0 Revision Clouds - option to match revision cloud with the selected object
Works similarly to tagging, example - https://imgur.com/a/Atr0nYE

This feature also can be useful in the future if we integrate revision clouds with ifcgit
2024-04-16 10:05:49 +02:00
Dion Moult 26ee0ca7b7 More tab and panel shuffling. Top level panels now have a tab prefix. 2024-04-16 10:05:49 +02:00
Dion Moult 6929c1a614 Disable Shift-D duplication of drawings for now until drawings stabilise more. Use the dedicated duplicate drawings feature. 2024-04-16 10:05:48 +02:00
Andrej730 0dce32ff4f Fixing bugs on small revision clouds #3310
Bugs were:
1) svg print ZeroDivisionError if there was less than 1 pattern segment
2) svg drawing wasn't preserving edge direction if there was less than 1 pattern segment
2024-04-16 10:05:48 +02:00
Andrej730 06df22e793 Fixed #3441 2024-04-16 10:05:48 +02:00
Dion Moult 85a633cd9a Fix #3449. Fix bug where you couldn't edit the relating type of an annotation. 2024-04-16 10:05:48 +02:00
Dion Moult 91b23ae853 Fix bug where loaded point geometry had unlinked meshes or placements with wrong units. 2024-04-16 10:05:48 +02:00
Dion Moult 1248059f39 Fix #3275. You can now rename annotation types from the annotation manager. 2024-04-16 10:05:48 +02:00
Dion Moult ff3bff13d2 Add support for arbitrary point annotations and survey point, traverse points, control points, spot elevations, etc. 2024-04-16 10:05:48 +02:00
Dion Moult 633ab31544 Fix #3288. Implement undo / redo until specified named transaction. Fix fundamental undo bug where Blender doesn't track the undo UUID property if you toggle edit mode.
This also has the nice side effect of implementing "Jump to point in history" so you can now use the Edit > Undo History menu.
2024-04-16 10:05:48 +02:00
Dion Moult 4926c486c5 More panel shuffling, new Quality and Coordination tab. Geometry is now part of materials. 2024-04-16 10:05:48 +02:00
Dion Moult 88d201ed85 Bulk rename panels to remove redundant IFC prefix 2024-04-16 10:05:48 +02:00
Dion Moult 2c976a4b59 Example of UI if we sentence-cased IFC classes. Good or bad? Please comment at https://community.osarch.org/discussion/comment/16493 2024-04-16 10:05:48 +02:00
Andrej730 73a74c1d66 small fix 90fce1804 2024-04-16 10:05:48 +02:00
Dion Moult 9f091e0a3f New icon tabbed interface so you don't need to click twice to change tab. 2024-04-16 10:05:48 +02:00
Dion Moult 3c2f4cd2f8 DANGER! Potentially fix a bunch of undo bugs by completely rebuilding undo id_map tracking with a much simpler solution.
In the past, we used undo_pre and redo_pre and a bunch of complex commit_link and rollback_link tracking to figure out what IDs and GUIDs were added / removed during transactions and how to handle invalidated objects in the id/guid maps.

I really don't know why I made it that complex.

Now we simply treat all data as bad and rebuild the either map. This means slower undos / redos for large projects, but in theory the maps will never invalidate.

This either fixes a lot of things or breaks a lot of things :) Watch out!
2024-04-16 10:05:48 +02:00
Dion Moult e7d4e3e50d Fix undo bugs in the type module where some operators were not part of the undo system for some reason. 2024-04-16 10:05:48 +02:00
Dion Moult c3c018283b Fix #3275. You can now rename types from the type manager. 2024-04-16 10:05:48 +02:00
Andrej730 d42aa7d8cb root.remove_product fix 2024-04-16 10:05:48 +02:00
Andrej730 a5dedbedbb oops, forgot to clean up the test name 2024-04-16 10:05:48 +02:00
Andrej730 b5902e0e5d Fixed plan level annotation rotation #3440 2024-04-16 10:05:48 +02:00
Andrej730 0fe3e56c63 StairData refactor, solves #3416 2024-04-16 10:05:48 +02:00
Andrej730 38dd5a218c root.copy_class to support copying ports in ifc2x3 2024-04-16 10:05:48 +02:00
Andrej730 6c88d55cb8 Clean up type objects on ifc import 2024-04-16 10:05:48 +02:00
Andrej730 197ecdf51c avoid IfcSpatialElement errors in ifc2x3
IfcSpatialElement was added only in ifc4
2024-04-16 10:05:48 +02:00
Andrej730 8943b71d4e clean up after running test_wall_opening.py 2024-04-16 10:05:48 +02:00
Andrej730 661441b231 remove_product to remove IfcRelConnectsElements 2024-04-16 10:05:48 +02:00
Andrej730 37bcbd077d Fixing confusing UI #3357
It was showing "Edit Profile" when you have slab and wall selected when it will actually extend the wall to the slab.
2024-04-16 10:05:48 +02:00
Dion Moult 8a64675e2c See #3421. Fix drawing bug where IfcOpenShell might return unclosed paths even though the shape is closed and therefore break cut polygon fills. 2024-04-16 10:05:47 +02:00
Dion Moult efd3ef1a89 See #3421. Fix bug where some projection fills wouldn't polygonize correctly in shapely due to numerical tolerance. 2024-04-16 10:05:47 +02:00
Dion Moult a1faf4fe08 Fix #3442. Update sheet list if drawing name changes. 2024-04-16 10:05:47 +02:00
Dion Moult 551db039d0 Move object data out of object tab and into new object dropdown. 2024-04-16 10:05:47 +02:00
Dion Moult 8553c79dea You can now open projects from the Ctrl-N shortcut. 2024-04-16 10:05:47 +02:00
Gorgious56 8339d04326 Improve slightly the boolean interface in mesh properties editor 2024-04-16 10:05:47 +02:00
Dion Moult 60b06bbc44 Fix #3414. The project wizard now doesn't load a fresh session by default. Note that File > Open still enforces a fresh session. 2024-04-16 10:05:47 +02:00
Andrej730 36e476b744 Cleaning up connections on delete_ifc
Noticed an error if you connect wall and slab, then remove the slab and try to regenerate the wall - error occured because connection to that slab wasn't removed.

The error was:
Error: Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\model\workspace.py", line 381, in invoke
    return self.execute(context)
  File "\3.6\scripts\addons\blenderbim\tool\ifc.py", line 136, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\3.6\scripts\addons\blenderbim\bim\ifc.py", line 421, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\workspace.py", line 373, in _execute
    getattr(self, f"hotkey_{self.hotkey}")()
  File "\3.6\scripts\addons\blenderbim\bim\module\model\workspace.py", line 465, in hotkey_S_E
    bpy.ops.bim.join_wall(join_type="T")
  File "C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\tool\ifc.py", line 136, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\3.6\scripts\addons\blenderbim\bim\ifc.py", line 421, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\wall.py", line 76, in _execute
    joiner.join_E(context.active_object, context.scene.cursor.location)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\wall.py", line 1038, in join_E
    self.recreate_wall(element1, wall1, axis, body)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\wall.py", line 1145, in recreate_wall
    height = self.clip(obj, tool.Ifc.get_object(rel.RelatingElement))
  File "\3.6\scripts\addons\blenderbim\tool\ifc.py", line 89, in get_object
    return IfcStore.get_element(element.id())
AttributeError: 'NoneType' object has no attribute 'id'
2024-04-16 10:05:47 +02:00
Dion Moult 57cb163c8f Fix #3393. Bug where duplicating a typed text didn't also copy its literal. 2024-04-16 10:05:47 +02:00
Andrej730 fa5e785849 Delete edit text from BIM Tool since it's already in Annotation Tool 2024-04-16 10:05:47 +02:00
Andrej730 1d56538152 handle null diffuse color loading ifc styles
The error was:
Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\style\prop.py", line 99, in update_shading_style
    tool.Style.set_surface_style_props(blender_material)
  File "\3.6\scripts\addons\blenderbim\tool\style.py", line 174, in set_surface_style_props
    style_data["DiffuseColour"] = style_data["DiffuseColour"][1]
TypeError: 'NoneType' object is not subscriptable
2024-04-16 10:05:47 +02:00
Gorgious56 5e709d5e64 Enable drawing generation buttons only when an actual drawing is selected 2024-04-16 10:05:47 +02:00
Andrej730 3cc3bace3a Fixed error on canceling editing railing/roof
Since we do not update representation for railing / roofs and just mark them wtih `tool.Ifc.edit(obj)` their previous representation may still be incorrect. So we restore the previous representation just using bmesh update method.

For example if create a new roof, enter editing roof properties mode and then cancel editing, then it would result in "Failed to process a shape" because roof still had just empty Body/PointCloud representation.
2024-04-16 10:05:47 +02:00
Andrej730 056f76c7c0 Fixing errors on loading ifc after ef8f82501
The error was:
RuntimeError: Operator bpy.ops.object.editmode_toggle.poll() failed, context is incorrect
Location: C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py:113
Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 594, in execute
    bpy.ops.bim.load_project_elements()
  File "C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 653, in execute
    ifc_importer.execute()
  File "\3.6\scripts\addons\blenderbim\bim\import_ifc.py", line 265, in execute
    self.clean_mesh()
  File "\3.6\scripts\addons\blenderbim\bim\import_ifc.py", line 1347, in clean_mesh
    bpy.ops.object.editmode_toggle(context_override)
  File "C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py", line 111, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Operator bpy.ops.object.editmode_toggle.poll() failed, context is incorrect
Location: C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py:113
2024-04-16 10:05:47 +02:00
Andrej730 d9b124715a Fixed console errors on checking modeling data 2024-04-16 10:05:47 +02:00
Dion Moult a00e47f822 Fix #3300. Bug where it was impossible to delete normal Blender objects in the outliner when an IFC existed.
Also port over batch deletion to the outliner override.
2024-04-16 10:05:47 +02:00
Andrej730 17420ca779 model data parameters renamed to pset_data for consitency 2024-04-16 10:05:47 +02:00
Andrej730 ee308ed0b8 DoorData use refactor 2024-04-16 10:05:47 +02:00