From 8a7af5cd05223c51bb26aedbda217917ec178c70 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Fri, 27 Jan 2017 23:01:45 -0800 Subject: [PATCH] Import pivy only if gui is up. --- src/Mod/Path/PathScripts/PathDressupHoldingTags.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index 8284cd8d2c..cdb598fec0 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -35,8 +35,7 @@ import math from PathScripts import PathUtils from PathScripts.PathGeom import PathGeom from PathScripts.PathPreferences import PathPreferences -from PySide import QtCore, QtGui -from pivy import coin +from PySide import QtCore """Holding Tags Dressup object and FreeCAD command""" @@ -48,6 +47,10 @@ def translate(text, context = "PathDressup_HoldingTags", disambig=None): LOG_MODULE = 'PathDressupHoldingTags' #PathLog.setLevel(PathLog.Level.DEBUG, LOG_MODULE) +if FreeCAD.GuiUp: + from pivy import coin + from PySide import QtCore + def debugEdge(edge, prefix, force = False): if force or PathLog.getLevel(LOG_MODULE) == PathLog.Level.DEBUG: pf = edge.valueAt(edge.FirstParameter)