Commit Graph

8945 Commits

Author SHA1 Message Date
Dion Moult 187160347a Fix bug where loading filtered IFC2X3 models didn't work. 2024-04-16 11:28:58 +02:00
Dion Moult 937fd00dba Fix #2719. Indicator whether or not IFC is dirty to help users know when to save. 2024-04-16 11:28:58 +02:00
Dion Moult 1ee2913dd1 See #4241. Only use shapely to repolygonise if IfcOpenShell returns unclosed paths. Hollow cuts typically are closed paths. 2024-04-16 11:28:58 +02:00
Dion Moult 5030023b1b Fix #4239. Stop users from duplicating IfcProject. 2024-04-16 11:28:58 +02:00
Dion Moult b5261e029e Fix regression where you couldn't unlink an object that already had a broken element link, and bug where you couldn't unlink a spatial element or similar with its own collection. 2024-04-16 11:28:58 +02:00
Dion Moult 29b84078ac See #4239. Ensure that all copy pasted objects are unlinked. Use duplicate if you want to copy. 2024-04-16 11:28:58 +02:00
Dion Moult 2308538735 See 0028fd3. Fix regression when duplicating objects without connections. 2024-04-16 11:28:58 +02:00
Andrej730 8ba68d0f0b static ifcopenshell.geom.serializers and some typing for IDE code hints
code itself should work exactly the same way
2024-04-16 11:28:58 +02:00
Thomas Krijnen ce927cfe30 #4216 todo note 2024-04-16 11:28:58 +02:00
Dion Moult 7b7dece5e7 See #4240. Guard against possible user creating invalid userdefined attribute values. 2024-04-16 11:28:58 +02:00
Dion Moult 0d3901336b See #4240. Fix validation issue with perspective drawing pyramid booleans. Boolean clipping results can only be used on swept solids. 2024-04-16 11:28:58 +02:00
Dion Moult 34c6be0f02 See #4240. Fix bug where 2D arbitrary profiles were invalid IFC (used 3D point lists not 2D) 2024-04-16 11:28:58 +02:00
Dion Moult 02c9aee70b Fix #3947. Do slight 2mm offset to account for Z-fighting on 2D plan views and RCPs. 2024-04-16 11:26:47 +02:00
Dion Moult d1f90db707 Fix #4213. Allow having separate windows to trigger drawing operators. 2024-04-16 11:26:47 +02:00
Dion Moult 3d19d4d319 See #4216. Document using OpenCASCADE geometry serialisation to create geometry. 2024-04-16 11:26:47 +02:00
Dion Moult 1574d8cfba Fix #4221. Only load leaf rows with cost values. Createing a monetary measure with None results in a segfault on Windows. 2024-04-16 11:26:47 +02:00
Dion Moult b67f753596 Fix #4236. Consolidate revert, reload IFC, and reload selected IFC operations.
Reload IFC incrementally (via diff) is moved to the debug panel since it is a dangerous advanced user command.
2024-04-16 11:26:47 +02:00
Dion Moult 4ee0930e05 Fix #4109. Write docs about geometry serialiser. 2024-04-16 11:26:47 +02:00
Dion Moult 6f1cb16107 Fix #4231. Bug where you couldn't add a door to an element assembly. 2024-04-16 11:26:47 +02:00
Andrej730 2268e60036 bbim_translations.py - remove operator context from operator tooltips
noticed editing translations from ui that operator tooltip doesn't appear in ui if tooltips has `msgctxt "Operator"`
2024-04-16 11:26:47 +02:00
Dion Moult 8c692dfbb6 Fix #4127. Bug where IfcTester couldn't save ODS report. 2024-04-16 11:26:47 +02:00
Andrej730 487d07badd fix build error 2024-04-16 11:26:47 +02:00
Andrej730 a936d56bf8 drop bpy related translations.py<->.po stuff as we won't be using it 2024-04-16 11:26:47 +02:00
Andrej730 d1e2009d78 run bbim_translations.py without bpy 2024-04-16 11:26:47 +02:00
Andrej730 b824ab4c4f save just a final dictionary to translations.py instead of tuples
We can do that since In our workflow we won't be converting translations.py to .po files, that way it will be much shorter as it's containing only translated strings and doesn't have strings sources.
2024-04-16 11:26:47 +02:00
Andrej730 3545a5ad4a generate translations.py without bpy 2024-04-16 11:26:46 +02:00
Andrej730 37b8a9bc89 gettext bug fix 2024-04-16 11:26:46 +02:00
Andrej730 6bea964db0 update blenderbim build to include translation data 2024-04-16 11:26:46 +02:00
Andrej730 2f04cb7b6f expose current blender locale in bbim translations ui 2024-04-16 11:26:46 +02:00
Andrej730 acc3a56adb bbim messages parser to also parse gettext 2024-04-16 11:26:46 +02:00
Andrej730 d5249cf45d keep order of strings in .pot as they were parsed and store source filepaths 2024-04-16 11:26:46 +02:00
Andrej730 56f383992a switch to our own string parser instead of blender's 2024-04-16 11:26:46 +02:00
Andrej730 228b7395c8 rename BlenderBIM translation script/addon 2024-04-16 11:26:46 +02:00
Andrej730 30d5141408 allow missing translations.py as not everyone will need translations for BBIM 2024-04-16 11:26:46 +02:00
Andrej730 1b69de2fd4 auto enable "Manage UI Translations" addon if it's not enabled 2024-04-16 11:26:46 +02:00
Andrej730 a3d029f9d9 add without-blender-way to generate translations module from po files
though it does require `bpy` module which is available only for python 3.10.
Actually, `bpy` module by itself is not necessary - we just need `bl_i18n_utils` that becomes available after `import `bpy`. So alternatively we can just download that module from Blender https://projects.blender.org/blender/blender/src/branch/main/scripts/modules/bl_i18n_utils
2024-04-16 11:26:46 +02:00
Andrej730 e1147c1cb8 black format 2024-04-16 11:26:46 +02:00
Andrej730 364c6efc68 check if translation ui is loaded by current Blender session instead of current Blender file
as it's more reliable and thing could change after Blender restart
2024-04-16 11:26:46 +02:00
Andrej730 793eebbdbb expose i18n path in translator UI
removed bim.open_po_directory operator as it's now available just from alt-clicking on the path browsing button
2024-04-16 11:26:46 +02:00
Andrej730 37d6b24e84 Update bbim_setup_translations.py 2024-04-16 11:26:46 +02:00
Andrej730 e76ef4bb73 fix issues with empty paths accepted as valid paths 2024-04-16 11:26:46 +02:00
Andrej730 1435207ab6 separate developer/translator ui 2024-04-16 11:26:46 +02:00
Andrej730 41b9000401 generate pot file too converting translations.py 2024-04-16 11:26:46 +02:00
Andrej730 94b1a1ba4e change test addon name from localization_test 2024-04-16 11:26:46 +02:00
Andrej730 b34882e6d1 semi-automatic setup for necessary directories 2024-04-16 11:26:46 +02:00
Andrej730 4a0625e730 register translations dict only if addon is already loaded 2024-04-16 11:26:46 +02:00
Andrej730 3973a6ab4d open .po directory operator 2024-04-16 11:26:46 +02:00
Andrej730 b9ecc394cf Operator to disable BBIM and restart Blender
as it's needed to reload the translations

Update bbim_setup_translations.py

Update bbim_setup_translations.py
2024-04-16 11:26:46 +02:00
Andrej730 b3990e7267 convert setup_translations to blender addon for UI 2024-04-16 11:26:46 +02:00
Andrej730 f8ca92279d monkey patch blender's dump_addon_messages
The way blender gather messages to translate is:
1) disable the addon
2) parse all available strings
3) enable the addon
4) parse all strings available strings again and subtract the ones gathered at step 2.

But due Blender bug (https://projects.blender.org/blender/blender/issues/116579) not all addon parts unregistered at step 1, so some addon's strings left out and gathered at step 2 and then subtracted at step 4. At the end, we loose them and they will be missing from resulting translations files.

I've monkey patched dump_addon_messages so it now works a bit more safe:
0) It expects addon to be disabled and Blender restarted after
1) Gather all Blender strings
2) Enable addon
3) Gather all Blender strings again and subtract strings from step 1.
2024-04-16 11:26:46 +02:00