Skip to content

Commit

Permalink
Revert "[WIP] update to collada2gltf 2.0"
Browse files Browse the repository at this point in the history
This reverts commit 0e6d6dc.
  • Loading branch information
feiss committed Mar 13, 2018
1 parent 0e6d6dc commit 1a9dc46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
13 changes: 4 additions & 9 deletions src/batchgltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def add(self, str):
class App(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
self.MAGIC = 'v2.0'
self.MAGIC = 'v1.0'
self.title('a COLLADA -> glTF batch converter')
ww = 700
wh = 500
Expand Down Expand Up @@ -134,28 +134,23 @@ def newSettings(self, event = None):
def openSettings(self, event = None):
file = tkFileDialog.askopenfile(parent = self, title = "Select Settings File:")
if not file: return
nosettings = False
self.newSettings()
for line in file:
l = line.strip().split('=')
if len(l) == 1:
if l[0] != self.MAGIC:
nosettings = True
tkMessageBox.showwarning('batchgltf', 'Warning: This settings file is from an different version.\nPaths will be loaded, but settings will be DISCARDED.')
if l[0] == 'src':
path = os.path.normpath(l[1])
self.fromlist.insert(tk.END, path)
elif l[0] == 'dst':
path = os.path.normpath(l[1])
self.tolist.insert(tk.END, path)
elif l[0] == 'params' and not nosettings:
elif l[0] == 'params':
params = l[1].split(';')
for p in params:
if p == "-e": self.embed_resources.set(1)
if p == "-k": self.use_materials_common.set(1)
if p == "-i": self.invert_transparency.set(1)
if p == "-l": self.default_lighting.set(1)
elif l[0] == 'options' and not nosettings:
elif l[0] == 'options':
options = l[1].split(';')
for o in options:
if o == "deldae": self.delete_dae.set(1)
Expand Down Expand Up @@ -282,7 +277,7 @@ def convertFile(file, outputfolder, name, parameters, progress = None):
os.chdir(currdir)

def checkCommand():
command = ["COLLADA2GLTF-bin", "-v"]
command = ["collada2gltf", "-v"]
try:
with open(os.devnull, "w") as fnull:
result = subprocess.call(command, stdout = fnull, stderr = fnull)
Expand Down
3 changes: 0 additions & 3 deletions src/sdfsf

This file was deleted.

0 comments on commit 1a9dc46

Please sign in to comment.