From 212bbc7fa088e8919693cfe10e5247f082ed5406 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 14 Feb 2023 11:12:19 +0100 Subject: [PATCH] App: define an enum to be used as the retType argument of DocumentObject.getSubObject() This is to avoid to use magic numbers in client code --- src/App/FreeCADInit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index 123c7522ca..f085c24718 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -947,6 +947,17 @@ class PropertyType(IntEnum): App.PropertyType = PropertyType +class ReturnType(IntEnum): + PyObject = 0 + DocObject = 1 + DocAndPyObject = 2 + Placement = 3 + Matrix = 4 + LinkAndPlacement = 5 + LinkAndMatrix = 6 + +App.ReturnType = ReturnType + # clean up namespace del(InitApplications) del(test_ascii)