Skip to content

Commit f7d792c

Browse files
committed
adjust settings layout, bump ver, add credits
1 parent 918d36a commit f7d792c

File tree

3 files changed

+64
-42
lines changed

3 files changed

+64
-42
lines changed

BabbleApp/algo_settings_widget.py

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,20 @@ def __init__(self, widget_id: Tab, main_config: BabbleSettingsConfig, osc_queue:
1313
self.gui_multiply = f"-MULTIPLY{widget_id}-"
1414
self.gui_model_file = f"-MODLEFILE{widget_id}-"
1515
self.gui_use_gpu = f"USEGPU{widget_id}"
16+
self.gui_speed_coefficient = f"-SPEEDCOEFFICIENT{widget_id}-"
17+
self.gui_min_cutoff = f"-MINCUTOFF{widget_id}-"
1618
self.main_config = main_config
1719
self.config = main_config.settings
1820
self.osc_queue = osc_queue
1921

2022
# Define the window's contents
2123
self.general_settings_layout = [
2224

23-
[sg.Text("Model output multiplier:", background_color='#424042'),
24-
sg.InputText(
25-
self.config.gui_multiply,
26-
key=self.gui_multiply,
27-
size=(0,8),
28-
tooltip = "Model output modifier.",
29-
),
30-
],
3125
[sg.Text("Model file:", background_color='#424042'),
3226
sg.InputText(
3327
self.config.gui_model_file,
3428
key=self.gui_model_file,
35-
size=(0, 8),
29+
size=(32),
3630
tooltip="Name of the model file.",
3731
),
3832
],
@@ -44,13 +38,42 @@ def __init__(self, widget_id: Tab, main_config: BabbleSettingsConfig, osc_queue:
4438
tooltip="Toggle GPU execution.",
4539
),
4640
],
41+
[sg.Text("Model output multiplier:", background_color='#424042'),
42+
sg.InputText(
43+
self.config.gui_multiply,
44+
key=self.gui_multiply,
45+
size=(4),
46+
tooltip = "Model output modifier.",
47+
),
48+
],
49+
[
50+
sg.Text("One Euro Filter Paramaters:", background_color='#242224'),
51+
],
52+
[
53+
54+
sg.Text("Min Frequency Cutoff", background_color='#424042'),
55+
sg.InputText(
56+
self.config.gui_min_cutoff,
57+
key=self.gui_min_cutoff,
58+
size=(7),
59+
),
60+
# ],
61+
# [
62+
sg.Text("Speed Coefficient", background_color='#424042'),
63+
sg.InputText(
64+
self.config.gui_speed_coefficient,
65+
key=self.gui_speed_coefficient,
66+
size=(5),
67+
),
68+
],
69+
4770

4871
]
4972

5073

5174
self.widget_layout = [
5275
[
53-
sg.Text("Tracking Algorithm Settings:", background_color='#242224'),
76+
sg.Text("Model Settings:", background_color='#242224'),
5477
],
5578
[
5679
sg.Column(self.general_settings_layout, key=self.gui_general_settings_layout, background_color='#424042' ),
@@ -93,6 +116,14 @@ def render(self, window, event, values):
93116
self.config.gui_use_gpu = values[self.gui_use_gpu]
94117
changed = True
95118

119+
if self.config.gui_min_cutoff != values[self.gui_min_cutoff]:
120+
self.config.gui_min_cutoff = values[self.gui_min_cutoff]
121+
changed = True
122+
123+
if self.config.gui_speed_coefficient != values[self.gui_speed_coefficient]:
124+
self.config.gui_speed_coefficient = values[self.gui_speed_coefficient]
125+
changed = True
126+
96127
if changed:
97128
self.main_config.save()
98129
#print(self.main_config)

BabbleApp/babbleapp.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
'''
2+
-------------------------------------------------------------------------------------------------------------
3+
██████╗ ██████╗ ██████╗ ██╗███████╗ ██████╗████████╗ ██████╗ █████╗ ██████╗ ██████╗ ██╗ ███████╗
4+
██╔══██╗██╔══██╗██╔═══██╗ ██║██╔════╝██╔════╝╚══██╔══╝ ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██║ ██╔════╝
5+
██████╔╝██████╔╝██║ ██║ ██║█████╗ ██║ ██║ ██████╔╝███████║██████╔╝██████╔╝██║ █████╗
6+
██╔═══╝ ██╔══██╗██║ ██║██ ██║██╔══╝ ██║ ██║ ██╔══██╗██╔══██║██╔══██╗██╔══██╗██║ ██╔══╝
7+
██║ ██║ ██║╚██████╔╝╚█████╔╝███████╗╚██████╗ ██║ ██████╔╝██║ ██║██████╔╝██████╔╝███████╗███████╗
8+
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚══════╝╚══════╝
9+
--------------------------------------------------------------------------------------------------------------
10+
GUI by: Prohurtz, qdot
11+
Model by: Summer
12+
App model implementation: Prohurtz, Summer
13+
14+
Additional contributors: RamesTheGeneric (dataset synthesizer),
15+
16+
Copyright (c) 2023 Project Babble <3
17+
'''
18+
119
import os
220
import PySimpleGUI as sg
321
import queue
@@ -10,9 +28,7 @@
1028
from osc import VRChatOSCReceiver, VRChatOSC
1129
from general_settings_widget import SettingsWidget
1230
from algo_settings_widget import AlgoSettingsWidget
13-
1431
from utils.misc_utils import is_nt
15-
1632
if is_nt:
1733
from winotify import Notification
1834
os.system('color') # init ANSI color
@@ -30,7 +46,7 @@
3046
ALGO_SETTINGS_RADIO_NAME = "-ALGOSETTINGSRADIO-"
3147

3248
page_url = "https://github.com/SummerSigh/ProjectBabble/releases/latest"
33-
appversion = "Babble v0.2.0 BETA"
49+
appversion = "Babble v0.2.1"
3450

3551

3652
def main():

BabbleApp/general_settings_widget.py

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,7 @@ def __init__(self, widget_id: Tab, main_config: BabbleSettingsConfig, osc_queue:
3333
tooltip = "Toggle update check on launch.",
3434
),
3535
],
36-
[
37-
sg.Text("One Euro Filter Paramaters:", background_color='#242224'),
38-
],
39-
[
40-
41-
sg.Text("Min Frequency Cutoff", background_color='#424042'),
42-
sg.InputText(
43-
self.config.gui_min_cutoff,
44-
key=self.gui_min_cutoff,
45-
size=(0,10),
46-
),
47-
#],
48-
#[
49-
sg.Text("Speed Coefficient", background_color='#424042'),
50-
sg.InputText(
51-
self.config.gui_speed_coefficient,
52-
key=self.gui_speed_coefficient,
53-
size=(0,10),
54-
),
55-
],
36+
5637
[
5738
sg.Text("OSC Settings:", background_color='#242224'),
5839
],
@@ -61,9 +42,11 @@ def __init__(self, widget_id: Tab, main_config: BabbleSettingsConfig, osc_queue:
6142
sg.InputText(
6243
self.config.gui_osc_location,
6344
key=self.gui_osc_location,
64-
size=(0, 30),
45+
size=(30),
6546
tooltip="Prefix for OSC address.",
6647
),
48+
],
49+
[
6750
sg.Text("Address:", background_color='#424042'),
6851
sg.InputText(
6952
self.config.gui_osc_address,
@@ -178,14 +161,6 @@ def render(self, window, event, values):
178161
if self.config.gui_osc_recalibrate_address != values[self.gui_osc_recalibrate_address]:
179162
self.config.gui_osc_recalibrate_address = values[self.gui_osc_recalibrate_address]
180163
changed = True
181-
182-
if self.config.gui_min_cutoff != values[self.gui_min_cutoff]:
183-
self.config.gui_min_cutoff = values[self.gui_min_cutoff]
184-
changed = True
185-
186-
if self.config.gui_speed_coefficient != values[self.gui_speed_coefficient]:
187-
self.config.gui_speed_coefficient = values[self.gui_speed_coefficient]
188-
changed = True
189164

190165
if self.config.gui_update_check != values[self.gui_update_check]:
191166
self.config.gui_update_check = values[self.gui_update_check]

0 commit comments

Comments
 (0)