Skip to content

Commit 98502af

Browse files
committed
add hlmvplusplus
1 parent 8b07d65 commit 98502af

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

icons/hlmvpp.png

2.22 KB
Loading

src/assetsBrowser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def open_file_explorer(self):
484484
repo_name = "SourceSDK-"
485485

486486
# Replace this with the version of your local software
487-
local_version = "1.1.1"
487+
local_version = "1.1.2"
488488

489489
setting = Setting(test.sdk)
490490

src/button.py

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Button:
1919
iconHammer : tk.PhotoImage
2020
iconSource : tk.PhotoImage
2121
iconHLMV : tk.PhotoImage
22+
iconHLMVplusplus : tk.PhotoImage
2223
iconQc_eyes : tk.PhotoImage
2324
iconHlposer : tk.PhotoImage
2425
iconVisualStudio : tk.PhotoImage
@@ -28,6 +29,7 @@ class Button:
2829
btn_hammer : tk.Button
2930
btn_hammer_plus_plus : tk.Button
3031
btn_hlmv : tk.Button
32+
btn_hlmv_plus_plus : tk.Button
3133
btn_qc_eyes : tk.Button
3234
btn_hlfaceposer : tk.Button
3335
btn_vtf_edit : tk.Button
@@ -58,6 +60,7 @@ def __init__(self,sourceSDK):
5860
self.iconHammer = tk.PhotoImage(file=os.path.join(base_path, "icons", "hammer.png"))
5961
self.iconSource = tk.PhotoImage(file=os.path.join(base_path, "icons", "source.png"))
6062
self.iconHLMV = tk.PhotoImage(file=os.path.join(base_path, "icons", "hlmv.png"))
63+
self.iconHLMVplusplus = tk.PhotoImage(file=os.path.join(base_path, "icons", "hlmvpp.png"))
6164
self.iconQc_eyes = tk.PhotoImage(file=os.path.join(base_path, "icons", "qc_eyes.png"))
6265
self.iconHlposer = tk.PhotoImage(file=os.path.join(base_path, "icons", "hlposer.png"))
6366
self.iconVisualStudio = tk.PhotoImage(file=os.path.join(base_path, "icons", "Visual_Studio.png"))
@@ -84,6 +87,8 @@ def destroy_button(self):
8487
self.btn_games.destroy()
8588
if os.path.isfile(self.sdk.bin_folder + "/hlmv.exe"):
8689
self.btn_hlmv.destroy()
90+
if os.path.isfile(self.sdk.bin_folder + "/hlmvplusplus.exe"):
91+
self.btn_hlmv_plus_plus.destroy()
8792
if os.path.isfile(self.sdk.bin_folder + "/hlfaceposer.exe"):
8893
self.btn_hlfaceposer.destroy()
8994
if os.path.isfile(os.getcwd() + "/VTfEdit/x64/VTFEdit.exe") or os.path.exists(r"C:\Program Files\Nem's Tools\VTFEdit\VTFEdit.exe"):
@@ -114,6 +119,10 @@ def display(self):
114119
self.btn_hlmv = tk.Button(self.sdk.root, text="hlmv", command=self.model.open_hlmv, image=self.iconHLMV, compound=tk.LEFT, background=self.sdk.background_color,fg=self.sdk.foreground_color)
115120
self.btn_hlmv.pack(side="left")
116121

122+
if os.path.isfile(self.sdk.bin_folder + "/hlmvplusplus.exe"):
123+
self.btn_hlmv_plus_plus= tk.Button(self.sdk.root, text="hlmv++", command=self.model.open_hlmvplusplus, image=self.iconHLMVplusplus, compound=tk.LEFT, background=self.sdk.background_color,fg=self.sdk.foreground_color)
124+
self.btn_hlmv_plus_plus.pack(side="left")
125+
117126
if os.path.isfile(self.sdk.bin_folder + "/qc_eyes.exe"):
118127
self.btn_qc_eyes= tk.Button(self.sdk.root, text="qc_eyes", command=self.open_qc_eyes, image=self.iconQc_eyes, compound=tk.LEFT, background=self.sdk.background_color,fg=self.sdk.foreground_color)
119128
self.btn_qc_eyes.pack(side="left")

src/model.py

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ def open_hlmv(self):
2424

2525
subprocess.Popen([self.sdk.bin_folder + "/hlmv.exe"])
2626

27+
def open_hlmvplusplus(self):
28+
"""
29+
"""
30+
31+
subprocess.Popen([self.sdk.bin_folder + "/hlmvplusplus.exe"])
32+
2733
def build_model(self, file=None):
2834
"""
2935
"""

src/open.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ def open_file(self, localpath):
4444
texture = Texture(self.sdk)
4545
texture.open_VTF(localpath)
4646
elif file_extension == ".mdl":
47-
command = f'"{self.sdk.bin_folder}/hlmv.exe" "{localpath}"'
47+
if os.path.isfile(self.sdk.bin_folder + "/hlmvplusplus.exe"):
48+
command = f'"{self.sdk.bin_folder}/hlmvplusplus.exe" "{localpath}"'
49+
else:
50+
command = f'"{self.sdk.bin_folder}/hlmv.exe" "{localpath}"'
4851
subprocess.Popen(command)
4952
elif file_extension == ".vmf":
50-
command = f'"{self.sdk.bin_folder}/hammer.exe" "{localpath}"'
53+
if os.path.isfile(self.sdk.bin_folder + "/hammerplusplus.exe"):
54+
command = f'"{self.sdk.bin_folder}/hammerplusplus.exe" "{localpath}"'
55+
else:
56+
command = f'"{self.sdk.bin_folder}/hammerplusplus.exe" "{localpath}"'
5157
subprocess.Popen(command)
5258
elif file_extension == ".vcd":
5359
command = f'"{self.sdk.bin_folder}/hlfaceposer.exe" "{localpath}"'
@@ -116,10 +122,16 @@ def open_file_source_extension(self, file_extension, filepath, file):
116122
texture = Texture(self.sdk)
117123
texture.open_VTF(filepath)
118124
elif file_extension == ".mdl":
119-
command = f'"{self.sdk.bin_folder}/hlmv.exe" "{filepath}"'
125+
if os.path.isfile(self.sdk.bin_folder + "/hlmvplusplus.exe"):
126+
command = f'"{self.sdk.bin_folder}/hlmvplusplus.exe" "{filepath}"'
127+
else:
128+
command = f'"{self.sdk.bin_folder}/hlmv.exe" "{filepath}"'
120129
subprocess.Popen(command)
121130
elif file_extension == ".vmf":
122-
command = f'"{self.sdk.bin_folder}/hammer.exe" "{filepath}"'
131+
if os.path.isfile(self.sdk.bin_folder + "/hammerplusplus.exe"):
132+
command = f'"{self.sdk.bin_folder}/hammerplusplus.exe" "{filepath}"'
133+
else:
134+
command = f'"{self.sdk.bin_folder}/hammerplusplus.exe" "{filepath}"'
123135
subprocess.Popen(command)
124136
elif file_extension == ".vcd":
125137
command = f'"{self.sdk.bin_folder}/hlfaceposer.exe" "{filepath}"'

0 commit comments

Comments
 (0)