Skip to content

Commit

Permalink
Fix what I broke while trying to fix the unique name issue
Browse files Browse the repository at this point in the history
For some reason, I broke a lot of things while implementing what I thought would be the best idea to avoid duplicate names in models and materials. I'm undoing that with in this commit, but I'll go back to it after receiving some feedback while the beta-testing phase is still going on.
  • Loading branch information
myuce committed Apr 5, 2021
1 parent 9150638 commit aeb0b21
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 127 deletions.
7 changes: 1 addition & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from datetime import datetime
from modules.MapExporter import exportMap



# global settings
settings = json.loads(open("res/settings.json").read())
gameDef = json.loads(open("res/gameDef.json").read())
Expand Down Expand Up @@ -54,7 +52,7 @@ def __init__(self, root: tk.Tk):
settingsMenu = tk.Menu(menuBar, tearoff=0)
menuBar.add_cascade(label="Settings", menu=settingsMenu)

self.currentGame = tk.IntVar(value=settings["currentGame"])
self.currentGame = tk.IntVar(value=settings["currentGame"] if settings["currentGame"] != -1 else len(gameDef) - 1)

currentGameMenu = tk.Menu(menuBar, tearoff=0)
for i in range(len(gameDef)):
Expand Down Expand Up @@ -93,7 +91,6 @@ def __init__(self, root: tk.Tk):
self.vmfPath["justify"] = "left"
self.vmfPath.place(x=80,y=10,width=690,height=30)


vpkLabel=tk.Label(root)
vpkLabel["font"] = ft
vpkLabel["fg"] = "#333333"
Expand Down Expand Up @@ -353,7 +350,6 @@ def saveConsoleLog(self):
return None
open(saveFile.name, "w").write(consoleLog)


def convertButton_command(self):
# save the extra vpk files and directories in case the user needs them later
vpkFiles = list(self.vpkList.get(0, self.vpkList.size() - 1))
Expand All @@ -369,7 +365,6 @@ def convertButton_command(self):
for dir in gameDef[self.currentGame.get()]["gameDirs"]:
gameDirs.append(settings["steamDir"] + "/steamapps/common/" + gameDef[self.currentGame.get()]["gameRoot"] + "/" + dir)


vmfPath = self.vmfPath.get()
# check if the selected file is a valid VMF file
if len(vmfPath) == "0":
Expand Down
Binary file modified bin/mdl2xmodel.exe
Binary file not shown.
Loading

0 comments on commit aeb0b21

Please sign in to comment.