Andrej730
cc15e6b3c1
typing
2024-11-07 17:09:56 +05:00
Andrej730
832ad6d318
Prioritize existing data types for templates props for safety
...
Noticed working on #5596 and #5708 a few issue when pset template is changing the prop types.
E.g. prop had string data type and now template suggests that it should be a float.
Previously, it might error trying to cast a string to a float. Now it will show a float until user will set it to null, then next time it will be loaded from the template data type.
Another example - prop was a string and now it's a boolean. Previously, it would be cast to boolean implicitly. E.g. "test" -> bool("test") -> True. And if user wouldn't be paying attention then enabling pset editing and saving it would make them lose "test" value.
Now - https://imgchest.com/p/na7ke99wb78
Before - https://imgchest.com/p/5xy23rr3z4l
2024-11-07 16:21:12 +05:00
Andrej730
ddf92ab8fb
typing
2024-09-10 18:28:02 +05:00
Dion Moult
07060fc769
Replace all ifcopenshell.api.run with ifcopenshell.api static functions.
2024-06-28 12:36:31 +10:00
Dion Moult
9331292dd1
Fix bug where editing qtos was hardcoded to IFC4.
2024-06-15 14:07:27 +10:00
Dion Moult
c4157673f5
Fix #4696 . Null properties are now purged by default to prevent cruft build up. Add support for purging empty enum props.
2024-05-20 16:04:27 +10:00
Andrej730
c6106e6636
fix edit_pset error for editing material properties in ifc2x3
2024-05-13 18:01:17 +05:00
Andrej730
2d35869c41
typing
2024-05-09 18:00:17 +05:00
Andrej730
dcc52fc4e4
pset.edit_pset not to fail silently on invalid enum values #4608
2024-05-06 18:22:52 +05:00
Andrej730
a9d785c28f
typing
2024-05-06 18:22:52 +05:00
Dion Moult
d11ec67129
Generate functions for all API usecases for better static code features. See #2693 .
2024-05-06 14:43:43 +10:00
Dion Moult
a213ab6760
Fix docstrings to reference datatype as it would be used for users
2024-05-06 08:39:48 +10:00
Andrej730
e3a1c29593
Fix #4365
...
Allowing to add new properties with None values if should_purge is not set to True (and it's False by default)
2024-02-27 17:33:56 +05:00
Dion Moult
20b7ee009d
Fix #3957 . Fix bug where shared properties were not edited independently.
2023-11-01 15:18:57 +11:00
Thomas Krijnen
9c21304629
Correct if-clause
2023-06-16 14:08:48 +02:00
Totally a booplicate
d31b470e83
smol fix
2023-06-16 14:08:48 +02:00
Totally a booplicate
1ecb25684e
fix missing else clause
2023-06-16 14:08:48 +02:00
Totally a booplicate
5999976d37
raise TypeError on invalid pset
2023-06-16 14:08:48 +02:00
Totally a booplicate
51e5f843ba
rework unpack_unit_value
...
handle the `None` case, simplify logic
2023-06-16 14:08:48 +02:00
Totally a booplicate
3d787338fb
improve naming of the new method
2023-06-16 14:08:48 +02:00
Totally a booplicate
de67648f3e
improve update_existing_properties
...
explicit class check
error out on a not supported type
better methods names
2023-06-16 14:08:48 +02:00
Totally a booplicate
afa803ea62
implement _try_purge
...
per review comment about repeating code
2023-06-16 14:08:48 +02:00
Totally a booplicate
3a0aaee03b
restructure if/elif/else chain
2023-06-16 14:08:48 +02:00
Totally a booplicate
a5353e02b5
support tuples
2023-06-16 14:08:48 +02:00
Totally a booplicate
1acc743370
move prop check
2023-06-16 14:08:48 +02:00
Totally a booplicate
375f4f2a86
per review
...
change exception message
remove TODO
pass `Unit`
raise `NotImplementedError` when no template was found
2023-06-16 14:08:48 +02:00
Totally a booplicate
d4b88fd422
resolve TODO
...
This is being fixed, we should always have a class to use
2023-06-16 14:08:48 +02:00
Totally a booplicate
df6cc74a87
attempt to improve pset support
...
1. Adds support to directly passed in property entities
2. Adds support for tuples
3. Adds support for P_LISTVALUE
2023-06-16 14:08:48 +02:00
Andrej730
812eb5eaef
Small documentation note
2023-05-25 16:09:43 +05:00
Dion Moult
fab76bbcde
Fixed bug where enumeration values in psets could be empty lists.
2023-03-27 23:08:47 +11:00
Carlos Villagrasa
fab7b590f7
Allow for custom IfcUnits when editing psets
2023-03-16 20:39:32 +11:00
Dion Moult
c8ba96cde8
Make syntax highlighting explicit in docs
2023-01-10 10:16:28 +11:00
Dion Moult
d2fee728f2
Write documentation for pset_template API module
2022-12-16 11:22:46 +11:00
Dion Moult
0ccea3cef8
Add documentation for pset API module
2022-12-15 16:02:27 +11:00
Vukas Pajic
0ca90817d8
Fix for Issue #2288
2022-07-17 10:08:24 +02:00
Vukas Pajic
6b9e670bf3
missing comma
2022-07-05 07:41:51 +02:00
Vukas Pajic
9e87f0f027
fix for issue #2261
2022-07-05 07:34:23 +02:00
Vukas Pajic
c73fedaaaf
fix error that stopped user from adding properties
2022-07-01 13:41:20 +02:00
Vukas Pajic
c8c9262090
initial commit
...
-Added support for adding and editing enums
-changed behaviour of template psets that have enums.
2022-06-29 17:23:27 +10:00
Dion Moult
810c71dfa2
IfcOpenShell-python licensing and black. See #1082 .
2022-01-19 12:18:33 +11:00
Dion Moult
4f047274bf
The IfcOpenShell API now supports automatic primitive casting for editing properties. See #1943 .
2022-01-07 17:38:43 +11:00
Dion Moult
a1817e8a61
Fix #1889 . Allow explicitly overriding data types when editing psets.
2021-11-24 16:38:19 +11:00
Dion Moult
8cde074fd8
Editing psets can now accept user specified data types and auto-detect non-string data types
2021-09-20 15:37:01 +10:00
Dion Moult
6bf692b44d
Fix #1401 . Modified custom psets are now immediately available without needing to restart Blender.
2021-07-29 16:16:01 +10:00
Dion Moult
1cd243f13c
Fix #1462 . Standardise IfcOpenShell API to use Pythonic argument names.
2021-05-28 10:59:39 +10:00
Dion Moult
35ceba2e88
Fix #1462 .
2021-05-12 19:12:46 +10:00
Dion Moult
37e3a65ffb
Decouple pset APIs from blenderbim namespace
2021-04-29 19:35:21 +10:00
Dion Moult
406b8b4540
IfcOpenShell API now uses kwargs to improve user syntax. See #1399 .
2021-03-27 19:14:46 +11:00
Jesusbill
9c00872a57
replace settings=None with {}
2021-03-25 00:54:42 +01:00
Dion Moult
d77bc6bdaa
First attempt at ripping out agnostic code into ifcopenshell.api namespace. See #1399 .
2021-03-25 10:48:48 +11:00