def Activated(self): selection = FreeCADGui.Selection.getSelectionEx() c = a2p_constraints.CenterOfMassConstraint(selection) cvp = a2p_constraintDialog.a2p_ConstraintValuePanel( c.constraintObject, 'createConstraint') FreeCADGui.Selection.clearSelection()
def onCenterOfMassButton(self): selection = FreeCADGui.Selection.getSelectionEx() self.activeConstraint = a2p_constraints.CenterOfMassConstraint(selection) self.manageConstraint()