FEM: prevent python added properties to be removed

This commit is contained in:
Florian Foinant-Willig
2024-04-27 21:57:29 +02:00
committed by Yorik van Havre
parent d1946bfebe
commit abd5d4daef
24 changed files with 201 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ class MaterialCommon(base_fempythonobject.BaseFemPythonObject):
"Material",
"List of material shapes"
)
obj.setPropertyStatus("References", "LockDynamic")
# Category
# attribute Category was added in commit 61fb3d429a
if not hasattr(obj, "Category"):
@@ -65,6 +66,7 @@ class MaterialCommon(base_fempythonobject.BaseFemPythonObject):
"Material",
"Material type: fluid or solid"
)
obj.setPropertyStatus("Category", "LockDynamic")
obj.Category = ["Solid", "Fluid"] # used in TaskPanel
obj.Category = "Solid"
"""