Commit Graph

8933 Commits

Author SHA1 Message Date
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
Andrej730 e9078453eb setup_translations - original dump_addon_messages
same as with dump_py_messages - this commit is needed to track monkey patch changes later on
2024-04-16 11:26:46 +02:00
Andrej730 df41f541de fix error converting translations to .po if .po files already exist 2024-04-16 11:26:46 +02:00
Andrej730 a2ea7bf1d8 monkey patch dump_py_messages to ignore blenderbim dependencies 2024-04-16 11:26:46 +02:00
Andrej730 a4be606a37 setup_translations - original dump_py_messages
as we're going to monkey patch it and this commit is needed to keep the history of changes
2024-04-16 11:26:46 +02:00
Andrej730 4342a03246 update translations in current blender session 2024-04-16 11:26:46 +02:00
Andrej730 b0c0839d3e setup_translations.py - use just 1 directory to store .po files
and use temp directory to store .po files for ui_translate.export/import
2024-04-16 11:26:46 +02:00
Andrej730 fd01d71d2c fixed typo 2024-04-16 11:26:46 +02:00
Andrej730 3046f2f207 BBIM - register translation strings #889 2024-04-16 11:26:46 +02:00
Andrej730 0371c2c74e BBIM script to reload/export/import translation strings #889 2024-04-16 11:26:46 +02:00
Ioannis P. Christovasilis bb05e51a92 ifc2ca major update - todo: update readme file 2024-04-16 11:26:46 +02:00
Vukas Pajic 9a117ce502 Fix #4226 2024-04-16 11:26:46 +02:00
Eduardo Schilling 144f028c84 Roof slope as percentage property 2024-04-16 11:26:46 +02:00