Commit Graph

8600 Commits

Author SHA1 Message Date
Dion Moult bee4e77d63 Fix #3432. Bug where null applicable occurrence of a type product caused the annotation tool to fail. 2024-04-16 10:05:47 +02:00
Andrej730 e92217a362 makefile fix 2024-04-16 10:05:47 +02:00
Andrej730 0a546d847c minor change for RailingData 2024-04-16 10:05:47 +02:00
Andrej730 984b33cd77 bim.load_project to refresh session on execute not invoke
if you accidentally opened file dialog or just changed your mind it shouldn't remove all objects from the current blender session
2024-04-16 10:05:47 +02:00
Andrej730 6505758171 RailingData use refactor, solves #3416 2024-04-16 10:05:47 +02:00
smr02 f0263b0e6c ifcsverchok delete api_WIP 2024-04-16 10:05:47 +02:00
Andrej730 928ccf1b9f display current commit in status bar
it works for users who symlinked their blenderbim/bim folders to git repository or installed blenderbim from release created from makefile
https://i.imgur.com/mEBH9I7.png
2024-04-16 10:05:47 +02:00
Gorgious56 55821117d5 Fix error when trying to edit an object that doesn't support edit mode with the TAB keypress
Also run black on the rest of the file
2024-04-16 10:05:47 +02:00
Dion Moult 5a0192c5c4 Fix #3420. Fix missing sheet references on drawings and incorrect direction of section references. 2024-04-16 10:05:47 +02:00
Andrej730 3abd3b1b0d more consistency in values for plan-, section level and diameter 2024-04-16 10:05:47 +02:00
Andrej730 1ae6a0eb5a radius annotation - support for prefix/suffix/fill-bg
and more consistency between viewport and svg
2024-04-16 10:05:46 +02:00
Andrej730 97b3bf5511 PLAN/SECTION_LEVEL consistency between viewport and svg
before - https://i.imgur.com/bwYbozz.png
after - https://i.imgur.com/7BlmQIg.png

NOTE that if you're using markers.svg that was created before this update you won't see the changes for the section-/plan-level markers.
2024-04-16 10:05:46 +02:00
Andrej730 710dce845e fill-bg for diameter, plan- and section-level annotations 2024-04-16 10:05:46 +02:00
Dion Moult e75afc9ffb Fix #3417. Apply 50mm offset to camera to ensure text isn't "behind" the camera. This 50mm convention is used in quite a few places, we should standardise it. 2024-04-16 10:05:46 +02:00
Dion Moult dc9b11832b Fix #3425. Fix invalid IFC data where grid axes should be 2D not 3D. 2024-04-16 10:05:46 +02:00
Thomas Krijnen c2aa09b374 Update entity_instance.py 2024-04-16 10:05:46 +02:00
Thomas Krijnen ffa9015798 Lingering changes after conflict resolution 2024-04-16 10:05:40 +02:00
Andrej730 8e4b93fb03 Prevent resetting selected tab on blender restart
Not sure if there is any caveats to that
2024-04-16 10:05:08 +02:00
Dion Moult a5af1ad79b Fix #3407. Override Ctrl-S to the export IFC which checks for Blender projects.
1. No IFC --> Saves Blend file
 2. IFC, unsaved Blend --> Saves IFC
 3. IFC, saved Blend --> Saves IFC and Blend
2024-04-16 10:05:08 +02:00
Andrej730 a43863cad3 PLAN_LEVEL annotations support for prefix, suffix #3399
Viewport - https://i.imgur.com/XRa3oJO.png
SVG - https://i.imgur.com/C8PjoiO.png
2024-04-16 10:05:08 +02:00
Dion Moult 2d19b82a63 Fix #3414. Only clear default scene, not custom scene when loading / creating IFCs. 2024-04-16 10:05:08 +02:00
Andrej730 3d96187a91 SECTION_LEVEL annotations support for prefix, suffix #3399
also added support for "show only description" for section_level
2024-04-16 10:05:08 +02:00
Andrej730 e5c5c18d8d Fixed #3400 introduced in dda16c8 2024-04-16 10:05:08 +02:00
Dion Moult ef0ccfd48f Resolve merge conflict 2024-04-16 10:05:08 +02:00
Dion Moult cdf617e95b Fix registration bug that created hundreds of workspaces due to continuous triggering of the depsgraph_update.
Use an is_registering check to only run the on_register once.

Rename setDefaultProperties to load_post to better reflect what handler it is.

Unregister our custom scene panels upon addon activation.

Move aprops getting to tool.Blender because it is a bit complex. Also, aprops may not be setup until load_post is called, so the len() check protects against that.
2024-04-16 10:05:08 +02:00
Gorgious56 b3c4c05690 Keep active object when unlinking an IFC element
Unlinking an element recreates a new blender object so the active object would be lost, jumping the properties to the scene panel which was slightly annoying
2024-04-16 10:05:08 +02:00
Andrej730 03aa63bd61 fixed properties search after 949a2bb and fixed console errors on search
1) When you search not from the SCENE properties blender creates some kind of phantom area to check search results. As this area is not present in `context.screen.areas` it was resulting in the error below.

2) After 949a2bb search in scene properties was limited to currently selected tab. Given the amount of tools we have in properties and native blender approach for searching across all available sections in properties, it seems reasonable to make search work across all tabs.

Console error was:
The error was
Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\ui.py", line 281, in draw
    aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
ValueError: bpy.data.screens['Layout.001']...Area is not in list
2024-04-16 10:05:08 +02:00
Dion Moult 562c775da2 Integrate brickschema undo system into BlenderBIM Add-on undo system wrapper 2024-04-16 10:05:08 +02:00
Andrej730 88defa07ce Fixed #3412
After 949a2bb printing happens not fron N-panel (which is part of viewport) but from scene properties - so current context doesn't have region_3d anymore.

PS The same issue was there all along if you'd try to print the drawing from Camera Properties tab.
2024-04-16 10:05:08 +02:00
Andrej730 37f3ecc8c5 allow to call select/color by attribute by providing arguments
instead of always checking scene.BIMSearchProperties. This allows to add different setups of selections to quick favorites
2024-04-16 10:05:08 +02:00
Dion Moult e451844e13 Implement Ctrl-Tab in properties to conveniently toggle between two tabs. 2024-04-16 10:05:08 +02:00
Dion Moult e72396585f Move built-in scene panels to a dedicated "Blender Properties" tab instead of unregistering permanently. 2024-04-16 10:05:08 +02:00
Andrej730 01ebb649d9 Library for US AISC15 Steel Profiles #3203 2024-04-16 10:05:08 +02:00
Gorgious56 f2dd6a6fc1 Trying to edit a railing modifier path while modifying the parameters is now prevented and user is informed with a tooltip 2024-04-16 10:05:08 +02:00
Gorgious56 332db04aa5 Fix IfcRailing modifier support spacing <= 0 would throw an error, and deactivate support spacing field if manual support is selected 2024-04-16 10:05:08 +02:00
Thomas Krijnen 4940f95d7a 2dc4bbf8cd Apply same logic for derived attributes 2024-04-16 10:05:08 +02:00
Dion Moult d29f0f171c Override Ctrl-N new file menu to make it easier to start new projects and new IFC icon. 2024-04-16 10:05:08 +02:00
Andrej730 acc5ca339f Using EPset_Drawing data instead of camera props on drawing print #3396
Previously if you change `HasUnderlay` in pset it caused errors because camera properties `has_underlay` wasn't updated.
Still some work need to be done for updating keep camera properties in sync with pset - probably we can should call something like `tool.Drawing.import_drawing()` on EPset_Drawing edit
2024-04-16 10:05:08 +02:00
Dion Moult 4359769d54 See #3411. Sheets are now sorted alphabetically by default. 2024-04-16 10:05:08 +02:00
Dion Moult 4eba6bd6c0 See #3016. Scene shading styles are now stored as part of the drawing style. 2024-04-16 10:05:08 +02:00
Dion Moult a81a48dc75 Update splash image to be centered 2024-04-16 10:05:07 +02:00
Dion Moult ac0f432190 Fix #3410. Minor regression when moving UI to properties panel. 2024-04-16 10:05:07 +02:00
Dion Moult a99f1e15cb Add support for Point representations too, not just point cloud. 2024-04-16 10:05:07 +02:00
Dion Moult 4ed1eedbfc Fix bug where all grouped annotations were excluded when opening models, whereas we only want drawing annotations to be excluded. 2024-04-16 10:05:07 +02:00
Massimo Fabbro d68294d420 Fix bug where drawing decimal places couldn't be 0. Now it's possible to define 0 as value 2024-04-16 10:05:07 +02:00
Dion Moult 8f555db5a4 Forgot to commit updated IfcTester test suite 2024-04-16 10:05:07 +02:00
Dion Moult 52ef8a6042 Fix critical undo sync bug related to invoking instead of executing. See notes.
Currently, the undo system works by wrapping the execute operator. What was not considered was that execute() isn't the only entry point to operators. Operators can be invoked. If an invoked operator calls a bpy.ops.bim.something in its invoke() function, then bpy.ops.bim.something will start and finish its own transaction, and then when the invoke finishes and finally runs execute(), another transaction will be started and finished. This means that we get at least one extra transaction logged (one per any call to bpy.ops.bim.foo in invoke()).

This mismatch of number of transactions and undo stack means that when the user presses ctrl-z, the undo doesn't actually occur. This leads to a sync bug.

To be safe, all IFC invokes must be wrapped. This will take some time to review so expect another commit soon.
2024-04-16 10:05:07 +02:00
Dion Moult 05a3a33a9a Drawing panels now moved to the drawings and documents "tab" 2024-04-16 10:05:07 +02:00
Dion Moult ea44fa8b89 Update IfcTester to comply with latest modifications to IDS XSD. 2024-04-16 10:05:07 +02:00
Dion Moult 2dbb566072 Visual clean up of annotation tool to only activate when a drawing is active and have a type manager similar to the BIM tool. 2024-04-16 10:05:07 +02:00