Skip to content

Commit

Permalink
Dressup gui import cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Jun 2, 2019
1 parent 71a3690 commit 285efa3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
7 changes: 5 additions & 2 deletions src/Mod/Path/PathScripts/PathDressupAxisMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
# * *
# ***************************************************************************
import FreeCAD
import FreeCADGui
import Path
import math
import PathScripts.PathGeom as PathGeom
import PathScripts.PathUtils as PathUtils

from PySide import QtCore, QtGui
from PySide import QtCore

if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui

"""Axis remapping Dressup object and FreeCAD command. This dressup remaps one axis of motion to another.
For example, you can re-map the Y axis to A to control a 4th axis rotary."""
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Path/PathScripts/PathDressupDogbone.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from __future__ import print_function
import DraftGeomUtils
import FreeCAD
import FreeCADGui
import math
import Part
import Path
Expand All @@ -34,7 +33,7 @@
import PathScripts.PathUtil as PathUtil
import PathScripts.PathUtils as PathUtils

from PySide import QtCore, QtGui
from PySide import QtCore

"""Dogbone Dressup object and FreeCAD command"""

Expand Down Expand Up @@ -1076,7 +1075,8 @@ def Activated(self):
FreeCAD.ActiveDocument.recompute()

if FreeCAD.GuiUp:
# register the FreeCAD command
import FreeCADGui
from PySide import QtGui
FreeCADGui.addCommand('Path_DressupDogbone', CommandDressupDogbone())

FreeCAD.Console.PrintLog("Loading DressupDogbone... done\n")
4 changes: 3 additions & 1 deletion src/Mod/Path/PathScripts/PathDressupDragknife.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

from __future__ import print_function
import FreeCAD
import FreeCADGui
import Path
from PySide import QtCore
import math
Expand All @@ -33,6 +32,9 @@

"""Dragknife Dressup object and FreeCAD command"""

if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui

# Qt translation handling
def translate(context, text, disambig=None):
Expand Down
4 changes: 3 additions & 1 deletion src/Mod/Path/PathScripts/PathDressupLeadInOut.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from __future__ import print_function

import FreeCAD
import FreeCADGui
import Path
import PathScripts.PathDressup as PathDressup
import PathScripts.PathGeom as PathGeom
Expand All @@ -37,6 +36,9 @@

"""LeadInOut Dressup MASHIN-CRC USE ROLL-ON ROLL-OFF to profile"""

if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui

# Qt translation handling
def translate(text, context="Path_DressupLeadInOut", disambig=None):
Expand Down
5 changes: 4 additions & 1 deletion src/Mod/Path/PathScripts/PathDressupRampEntry.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# * *
# ***************************************************************************
import FreeCAD
import FreeCADGui
import Path
import Part
import PathScripts.PathDressup as PathDressup
Expand All @@ -33,6 +32,10 @@
from PathScripts import PathUtils
from PySide import QtCore

if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui


# Qt translation handling
def translate(text, context="Path_DressupRampEntry", disambig=None):
Expand Down
1 change: 0 additions & 1 deletion src/Mod/Path/PathTests/TestPathGeom.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import unittest

from FreeCAD import Vector
#from PathScripts.PathDressupHoldingTags import *
from PathTests.PathTestUtils import PathTestBase

class TestPathGeom(PathTestBase):
Expand Down

0 comments on commit 285efa3

Please sign in to comment.