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

@@ -45,18 +45,21 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
"Parameter",
"Velocity in x-direction"
)
obj.setPropertyStatus("VelocityX", "LockDynamic")
obj.addProperty(
"App::PropertyString",
"VelocityXFormula",
"Parameter",
"Velocity formula in x-direction"
)
obj.setPropertyStatus("VelocityXFormula", "LockDynamic")
obj.addProperty(
"App::PropertyBool",
"VelocityXUnspecified",
"Parameter",
"Use velocity in x-direction"
)
obj.setPropertyStatus("VelocityXUnspecified", "LockDynamic")
obj.VelocityXUnspecified = True
obj.addProperty(
"App::PropertyBool",
@@ -64,6 +67,7 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
"Parameter",
"Use formula for velocity in x-direction"
)
obj.setPropertyStatus("VelocityXHasFormula", "LockDynamic")
obj.addProperty(
"App::PropertyVelocity",
@@ -71,18 +75,21 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
"Parameter",
"Velocity in y-direction"
)
obj.setPropertyStatus("VelocityY", "LockDynamic")
obj.addProperty(
"App::PropertyString",
"VelocityYFormula",
"Parameter",
"Velocity formula in y-direction"
)
obj.setPropertyStatus("VelocityYFormula", "LockDynamic")
obj.addProperty(
"App::PropertyBool",
"VelocityYUnspecified",
"Parameter",
"Use velocity in y-direction"
)
obj.setPropertyStatus("VelocityYUnspecified", "LockDynamic")
obj.VelocityYUnspecified = True
obj.addProperty(
"App::PropertyBool",
@@ -90,6 +97,7 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
"Parameter",
"Use formula for velocity in y-direction"
)
obj.setPropertyStatus("VelocityYHasFormula", "LockDynamic")
obj.addProperty(
"App::PropertyVelocity",
@@ -97,18 +105,21 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
"Parameter",
"Velocity in z-direction"
)
obj.setPropertyStatus("VelocityZ", "LockDynamic")
obj.addProperty(
"App::PropertyString",
"VelocityZFormula",
"Parameter",
"Velocity formula in z-direction"
)
obj.setPropertyStatus("VelocityZFormula", "LockDynamic")
obj.addProperty(
"App::PropertyBool",
"VelocityZUnspecified",
"Parameter",
"Use velocity in z-direction"
)
obj.setPropertyStatus("VelocityZUnspecified", "LockDynamic")
obj.VelocityZUnspecified = True
obj.addProperty(
"App::PropertyBool",
@@ -116,3 +127,4 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
"Parameter",
"Use formula for velocity in z-direction"
)
obj.setPropertyStatus("VelocityZHasFormula", "LockDynamic")