mirror of
https://github.com/Project-Babble/ProjectBabble.git
synced 2026-11-26 20:06:24 -08:00
adjust settings layout, bump ver, add credits
This commit is contained in:
1 parent
eb0078e404
commit
6bae8ab865
3 files changed
+64
-42
No files matched your search
@@ -13,6 +13,8 @@ class AlgoSettingsWidget:
|
||||
self.gui_multiply = f"-MULTIPLY{widget_id}-"
|
||||
self.gui_model_file = f"-MODLEFILE{widget_id}-"
|
||||
self.gui_use_gpu = f"USEGPU{widget_id}"
|
||||
self.gui_speed_coefficient = f"-SPEEDCOEFFICIENT{widget_id}-"
|
||||
self.gui_min_cutoff = f"-MINCUTOFF{widget_id}-"
|
||||
self.main_config = main_config
|
||||
self.config = main_config.settings
|
||||
self.osc_queue = osc_queue
|
||||
@@ -20,19 +22,11 @@ class AlgoSettingsWidget:
|
||||
# Define the window's contents
|
||||
self.general_settings_layout = [
|
||||
|
||||
[sg.Text("Model output multiplier:", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_multiply,
|
||||
key=self.gui_multiply,
|
||||
size=(0,8),
|
||||
tooltip = "Model output modifier.",
|
||||
),
|
||||
],
|
||||
[sg.Text("Model file:", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_model_file,
|
||||
key=self.gui_model_file,
|
||||
size=(0, 8),
|
||||
size=(32),
|
||||
tooltip="Name of the model file.",
|
||||
),
|
||||
],
|
||||
@@ -44,13 +38,42 @@ class AlgoSettingsWidget:
|
||||
tooltip="Toggle GPU execution.",
|
||||
),
|
||||
],
|
||||
[sg.Text("Model output multiplier:", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_multiply,
|
||||
key=self.gui_multiply,
|
||||
size=(4),
|
||||
tooltip = "Model output modifier.",
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text("One Euro Filter Paramaters:", background_color='#242224'),
|
||||
],
|
||||
[
|
||||
|
||||
sg.Text("Min Frequency Cutoff", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_min_cutoff,
|
||||
key=self.gui_min_cutoff,
|
||||
size=(7),
|
||||
),
|
||||
# ],
|
||||
# [
|
||||
sg.Text("Speed Coefficient", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_speed_coefficient,
|
||||
key=self.gui_speed_coefficient,
|
||||
size=(5),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
||||
self.widget_layout = [
|
||||
[
|
||||
sg.Text("Tracking Algorithm Settings:", background_color='#242224'),
|
||||
sg.Text("Model Settings:", background_color='#242224'),
|
||||
],
|
||||
[
|
||||
sg.Column(self.general_settings_layout, key=self.gui_general_settings_layout, background_color='#424042' ),
|
||||
@@ -93,6 +116,14 @@ class AlgoSettingsWidget:
|
||||
self.config.gui_use_gpu = values[self.gui_use_gpu]
|
||||
changed = True
|
||||
|
||||
if self.config.gui_min_cutoff != values[self.gui_min_cutoff]:
|
||||
self.config.gui_min_cutoff = values[self.gui_min_cutoff]
|
||||
changed = True
|
||||
|
||||
if self.config.gui_speed_coefficient != values[self.gui_speed_coefficient]:
|
||||
self.config.gui_speed_coefficient = values[self.gui_speed_coefficient]
|
||||
changed = True
|
||||
|
||||
if changed:
|
||||
self.main_config.save()
|
||||
#print(self.main_config)
|
||||
|
||||
+19
-3
@@ -1,3 +1,21 @@
|
||||
'''
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
██████╗ ██████╗ ██████╗ ██╗███████╗ ██████╗████████╗ ██████╗ █████╗ ██████╗ ██████╗ ██╗ ███████╗
|
||||
██╔══██╗██╔══██╗██╔═══██╗ ██║██╔════╝██╔════╝╚══██╔══╝ ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██║ ██╔════╝
|
||||
██████╔╝██████╔╝██║ ██║ ██║█████╗ ██║ ██║ ██████╔╝███████║██████╔╝██████╔╝██║ █████╗
|
||||
██╔═══╝ ██╔══██╗██║ ██║██ ██║██╔══╝ ██║ ██║ ██╔══██╗██╔══██║██╔══██╗██╔══██╗██║ ██╔══╝
|
||||
██║ ██║ ██║╚██████╔╝╚█████╔╝███████╗╚██████╗ ██║ ██████╔╝██║ ██║██████╔╝██████╔╝███████╗███████╗
|
||||
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚══════╝╚══════╝
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
GUI by: Prohurtz, qdot
|
||||
Model by: Summer
|
||||
App model implementation: Prohurtz, Summer
|
||||
|
||||
Additional contributors: RamesTheGeneric (dataset synthesizer),
|
||||
|
||||
Copyright (c) 2023 Project Babble <3
|
||||
'''
|
||||
|
||||
import os
|
||||
import PySimpleGUI as sg
|
||||
import queue
|
||||
@@ -10,9 +28,7 @@ from tab import CamInfo, Tab
|
||||
from osc import VRChatOSCReceiver, VRChatOSC
|
||||
from general_settings_widget import SettingsWidget
|
||||
from algo_settings_widget import AlgoSettingsWidget
|
||||
|
||||
from utils.misc_utils import is_nt
|
||||
|
||||
if is_nt:
|
||||
from winotify import Notification
|
||||
os.system('color') # init ANSI color
|
||||
@@ -30,7 +46,7 @@ SETTINGS_RADIO_NAME = "-SETTINGSRADIO-"
|
||||
ALGO_SETTINGS_RADIO_NAME = "-ALGOSETTINGSRADIO-"
|
||||
|
||||
page_url = "https://github.com/SummerSigh/ProjectBabble/releases/latest"
|
||||
appversion = "Babble v0.2.0 BETA"
|
||||
appversion = "Babble v0.2.1"
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -33,26 +33,7 @@ class SettingsWidget:
|
||||
tooltip = "Toggle update check on launch.",
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text("One Euro Filter Paramaters:", background_color='#242224'),
|
||||
],
|
||||
[
|
||||
|
||||
sg.Text("Min Frequency Cutoff", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_min_cutoff,
|
||||
key=self.gui_min_cutoff,
|
||||
size=(0,10),
|
||||
),
|
||||
#],
|
||||
#[
|
||||
sg.Text("Speed Coefficient", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_speed_coefficient,
|
||||
key=self.gui_speed_coefficient,
|
||||
size=(0,10),
|
||||
),
|
||||
],
|
||||
|
||||
[
|
||||
sg.Text("OSC Settings:", background_color='#242224'),
|
||||
],
|
||||
@@ -61,9 +42,11 @@ class SettingsWidget:
|
||||
sg.InputText(
|
||||
self.config.gui_osc_location,
|
||||
key=self.gui_osc_location,
|
||||
size=(0, 30),
|
||||
size=(30),
|
||||
tooltip="Prefix for OSC address.",
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text("Address:", background_color='#424042'),
|
||||
sg.InputText(
|
||||
self.config.gui_osc_address,
|
||||
@@ -178,14 +161,6 @@ class SettingsWidget:
|
||||
if self.config.gui_osc_recalibrate_address != values[self.gui_osc_recalibrate_address]:
|
||||
self.config.gui_osc_recalibrate_address = values[self.gui_osc_recalibrate_address]
|
||||
changed = True
|
||||
|
||||
if self.config.gui_min_cutoff != values[self.gui_min_cutoff]:
|
||||
self.config.gui_min_cutoff = values[self.gui_min_cutoff]
|
||||
changed = True
|
||||
|
||||
if self.config.gui_speed_coefficient != values[self.gui_speed_coefficient]:
|
||||
self.config.gui_speed_coefficient = values[self.gui_speed_coefficient]
|
||||
changed = True
|
||||
|
||||
if self.config.gui_update_check != values[self.gui_update_check]:
|
||||
self.config.gui_update_check = values[self.gui_update_check]
|
||||
|
||||
Reference in new issue
Block a user