forked from SofaDefrost/ModelOrderReduction
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_scene.py
More file actions
36 lines (28 loc) · 960 Bytes
/
debug_scene.py
File metadata and controls
36 lines (28 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
import os
import platform
from sys import argv
# STLIB IMPORT
try:
from stlib3.scene.wrapper import Wrapper
except:
raise ImportError("ModelOrderReduction plugin depend on SPLIB"\
+"Please install it : https://github.com/SofaDefrost/STLIB")
# MOR IMPORT
from mor.utility import sceneCreation as sc
from mor.utility import utility as u
slash = '/'
if "Windows" in platform.platform():
slash = "\\"
# Our Original Scene IMPORT
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../finger.pyscn"
originalScene = os.path.normpath(originalScene)
originalScene = u.load_source(originalScene.split(slash)[-1], originalScene)
def createScene(rootNode):
if (len(argv) > 1):
stateFileName = str(argv[1])
else:
stateFileName="stateFile.state"
originalScene.createScene(rootNode)
pathToNode = 'finger'
sc.createDebug(rootNode,pathToNode,stateFileName)