From 3f7a3b07ca958fe6755f46bd2bc94618fb056e14 Mon Sep 17 00:00:00 2001 From: Steven Quirin <102602077+s-quirin@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:13:04 +0100 Subject: [PATCH] [CenterOfMass] FreeCAD 0.20 compatibility Disable #179 fix for FreeCAD 0.20 --- Information/CenterOfMass.FCMacro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Information/CenterOfMass.FCMacro b/Information/CenterOfMass.FCMacro index e868339..b5cf4db 100644 --- a/Information/CenterOfMass.FCMacro +++ b/Information/CenterOfMass.FCMacro @@ -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