Skip to content

Commit 7aa9302

Browse files
committed
Remove use of deleted module to fix scene test error
1 parent d77c0d3 commit 7aa9302

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

examples/others/caduceus/reduced/debug/debug_scene.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
import os
3-
import imp
43
import platform
54
from sys import argv
65

@@ -12,7 +11,8 @@
1211
+"Please install it : https://github.com/SofaDefrost/STLIB")
1312

1413
# MOR IMPORT
15-
from mor.utility import sceneCreation as u
14+
from mor.utility import sceneCreation as sc
15+
from mor.utility import utility as u
1616

1717
slash = '/'
1818
if "Windows" in platform.platform():
@@ -21,7 +21,7 @@
2121
# Our Original Scene IMPORT
2222
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../caduceusNG.pyscn"
2323
originalScene = os.path.normpath(originalScene)
24-
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)
24+
originalScene = u.load_source(originalScene.split(slash)[-1], originalScene)
2525

2626
def createScene(rootNode):
2727

@@ -33,4 +33,4 @@ def createScene(rootNode):
3333

3434
pathToNode = 'Snake'
3535

36-
u.createDebug(rootNode,pathToNode,stateFileName)
36+
sc.createDebug(rootNode,pathToNode,stateFileName)

examples/others/hexaBeam/reduced/debug/debug_scene.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
import os
3-
import imp
43
import platform
54
from sys import argv
65

@@ -12,7 +11,8 @@
1211
+"Please install it : https://github.com/SofaDefrost/STLIB")
1312

1413
# MOR IMPORT
15-
from mor.utility import sceneCreation as u
14+
from mor.utility import sceneCreation as sc
15+
from mor.utility import utility as u
1616

1717
slash = '/'
1818
if "Windows" in platform.platform():
@@ -21,7 +21,7 @@
2121
# Our Original Scene IMPORT
2222
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../hexaBeam.pyscn"
2323
originalScene = os.path.normpath(originalScene)
24-
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)
24+
originalScene = u.load_source(originalScene.split(slash)[-1], originalScene)
2525

2626
def createScene(rootNode):
2727

@@ -33,4 +33,4 @@ def createScene(rootNode):
3333

3434
pathToNode = 'M1'
3535

36-
u.createDebug(rootNode,pathToNode,stateFileName)
36+
sc.createDebug(rootNode,pathToNode,stateFileName)

examples/softRobots/finger/reduced/debug/debug_scene.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
import os
3-
import imp
43
import platform
54
from sys import argv
65

@@ -12,7 +11,8 @@
1211
+"Please install it : https://github.com/SofaDefrost/STLIB")
1312

1413
# MOR IMPORT
15-
from mor.utility import sceneCreation as u
14+
from mor.utility import sceneCreation as sc
15+
from mor.utility import utility as u
1616

1717
slash = '/'
1818
if "Windows" in platform.platform():
@@ -21,7 +21,7 @@
2121
# Our Original Scene IMPORT
2222
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../finger.pyscn"
2323
originalScene = os.path.normpath(originalScene)
24-
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)
24+
originalScene = u.load_source(originalScene.split(slash)[-1], originalScene)
2525

2626
def createScene(rootNode):
2727

@@ -33,4 +33,4 @@ def createScene(rootNode):
3333

3434
pathToNode = 'finger'
3535

36-
u.createDebug(rootNode,pathToNode,stateFileName)
36+
sc.createDebug(rootNode,pathToNode,stateFileName)

examples/softRobots/sofiaLeg/reduced/debug/debug_scene.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
import os
3-
import imp
43
import platform
54
from sys import argv
65

@@ -12,7 +11,8 @@
1211
+"Please install it : https://github.com/SofaDefrost/STLIB")
1312

1413
# MOR IMPORT
15-
from mor.utility import sceneCreation as u
14+
from mor.utility import sceneCreation as sc
15+
from mor.utility import utility as u
1616

1717
slash = '/'
1818
if "Windows" in platform.platform():
@@ -21,7 +21,7 @@
2121
# Our Original Scene IMPORT
2222
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../sofiaLeg.py"
2323
originalScene = os.path.normpath(originalScene)
24-
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)
24+
originalScene = u.load_source(originalScene.split(slash)[-1], originalScene)
2525

2626
def createScene(rootNode):
2727

@@ -33,4 +33,4 @@ def createScene(rootNode):
3333

3434
pathToNode = 'SofiaLeg'
3535

36-
u.createDebug(rootNode,pathToNode,stateFileName)
36+
sc.createDebug(rootNode,pathToNode,stateFileName)

0 commit comments

Comments
 (0)