From 8ad08606ef5e41bc0aeea6650fe54e7771c42212 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Thu, 14 Jun 2018 02:03:08 +0300 Subject: [PATCH] fix for FC v0.16 --- lattice2Common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lattice2Common.py b/lattice2Common.py index 5554a95..2f8b0da 100644 --- a/lattice2Common.py +++ b/lattice2Common.py @@ -94,6 +94,9 @@ def screen(feature): return feature def activeBody(): + if FreeCAD.ActiveDocument is None: return None + if not hasattr(FreeCADGui.ActiveDocument.ActiveView, 'getActiveObject'): #prevent errors in 0.16 + return None return FreeCADGui.ActiveDocument.ActiveView.getActiveObject("pdbody") def bodyOf(feature):