Assembly: Replace "Activated" property by the core "Suppressed" mecha… (#22409)

* Assembly: Replace "Activated" property by the core "Suppressed" mechanism.

* Fix inaccuracy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* move the change to migrationScript5 function

* Update JointObject.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
PaddleStroke
2025-07-28 18:20:01 +02:00
committed by GitHub
parent 40db448db2
commit ae5564d50c
5 changed files with 33 additions and 24 deletions

View File

@@ -404,8 +404,8 @@ void setJointActivated(const App::DocumentObject* joint, bool val)
return;
}
if (auto propActivated = joint->getPropertyByName<App::PropertyBool>("Activated")) {
propActivated->setValue(val);
if (auto propSuppressed = joint->getPropertyByName<App::PropertyBool>("Suppressed")) {
propSuppressed->setValue(!val);
}
}
@@ -415,8 +415,8 @@ bool getJointActivated(const App::DocumentObject* joint)
return false;
}
if (const auto propActivated = joint->getPropertyByName<App::PropertyBool>("Activated")) {
return propActivated->getValue();
if (const auto propActivated = joint->getPropertyByName<App::PropertyBool>("Suppressed")) {
return !propActivated->getValue();
}
return false;
}