Skip to content

Commit

Permalink
[CenterOfMass] FreeCAD 0.20 compatibility
Browse files Browse the repository at this point in the history
Disable FreeCAD#179 fix for FreeCAD 0.20
  • Loading branch information
s-quirin authored Jan 11, 2025
1 parent 2b85911 commit 3f7a3b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Information/CenterOfMass.FCMacro
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,8 @@ class CenterofmassWidget(QtGui.QWidget):
# create valid selection list
vsel = []
for s_ in _sel:
p_ = s_.getParent()
p_ = s_.getParent() if callable(getattr(s_, 'getParent', None)) else False
# no getParent() in FreeCAD 0.20
if p_ and p_.Name == 'CenterOfMass' and p_.TypeId == 'App::DocumentObjectGroup':
# Skip objects created for the macro to avoid error or crash
continue
Expand Down

0 comments on commit 3f7a3b0

Please sign in to comment.