From 8c117d5b1f167b126ef85bf297d6b37fcd5692b9 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Thu, 13 Feb 2025 13:05:21 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20Build=20:?= =?UTF-8?q?=20=E3=83=93=E3=83=AB=E3=83=89=E6=99=82=E3=81=AB=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clean.py | 6 ++++++ package.json | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 clean.py diff --git a/clean.py b/clean.py new file mode 100644 index 00000000..93084e62 --- /dev/null +++ b/clean.py @@ -0,0 +1,6 @@ +import shutil + +shutil.rmtree('build', ignore_errors=True) +shutil.rmtree('dist', ignore_errors=True) +shutil.rmtree('src-tauri\\bin', ignore_errors=True) +shutil.rmtree('src-tauri\\target', ignore_errors=True) \ No newline at end of file diff --git a/package.json b/package.json index 5cbeaae6..48ee7f7e 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,12 @@ "vite-preview": "vite preview", "tauri": "tauri", "tauri-dev": "tauri dev", + "clean": "python clean.py", "dev": "npm run build-python && npm run dev-ui", "dev-cuda": "npm run build-python-cuda && npm run dev-ui", "dev-ui": "npm-run-all --parallel vite tauri-dev", - "build": "npm run build-python && npm run vite-build && npm run tauri build", - "build-cuda": "npm run build-python-cuda && npm run vite-build && npm run tauri build", + "build": "npm run clean && npm run build-python && npm run vite-build && npm run tauri build", + "build-cuda": "npm run clean && npm run build-python-cuda && npm run vite-build && npm run tauri build", "release": "npm run build && python zip.py --zip_name VRCT.zip", "release-cuda": "npm run build-cuda && python zip.py --zip_name VRCT_cuda.zip", "release-all": "npm run release && npm run release-cuda" From 4b61178b0edf2ed63a7f7a9eae03af57fe7f1dfe Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:23:02 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20Main/Contro?= =?UTF-8?q?ller/Model/Config=20:=20VRC=20ChatBox=E3=81=AE=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E9=9F=B3=E3=81=AEON/OFF=E3=81=AE=E3=82=A8=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/config.py | 12 ++++++++++++ src-python/controller.py | 14 ++++++++++++++ src-python/mainloop.py | 4 ++++ src-python/model.py | 4 ++-- 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src-python/config.py b/src-python/config.py index 6b8433d1..db67aab4 100644 --- a/src-python/config.py +++ b/src-python/config.py @@ -931,6 +931,17 @@ class Config: self._VRC_MIC_MUTE_SYNC = value self.saveConfig(inspect.currentframe().f_code.co_name, value) + @property + @json_serializable('NOTIFICATION_VRC_SFX') + def NOTIFICATION_VRC_SFX(self): + return self._NOTIFICATION_VRC_SFX + + @NOTIFICATION_VRC_SFX.setter + def NOTIFICATION_VRC_SFX(self, value): + if isinstance(value, bool): + self._NOTIFICATION_VRC_SFX = value + self.saveConfig(inspect.currentframe().f_code.co_name, value) + def init_config(self): # Read Only self._VERSION = "3.0.2" @@ -1114,6 +1125,7 @@ class Config: self._SEND_RECEIVED_MESSAGE_TO_VRC = False self._LOGGER_FEATURE = False self._VRC_MIC_MUTE_SYNC = False + self._NOTIFICATION_VRC_SFX = True def load_config(self): if os_path.isfile(self.PATH_CONFIG) is not False: diff --git a/src-python/controller.py b/src-python/controller.py index bd193ff0..bb94bf26 100644 --- a/src-python/controller.py +++ b/src-python/controller.py @@ -1099,6 +1099,20 @@ class Controller: model.setOscPort(config.OSC_PORT) return {"status":200, "result":config.OSC_PORT} + @staticmethod + def getNotificationVrcSfx(*args, **kwargs) -> dict: + return {"status":200, "result":config.NOTIFICATION_VRC_SFX} + + @staticmethod + def setEnableNotificationVrcSfx(*args, **kwargs) -> dict: + config.NOTIFICATION_VRC_SFX = True + return {"status":200, "result":config.NOTIFICATION_VRC_SFX} + + @staticmethod + def setDisableNotificationVrcSfx(*args, **kwargs) -> dict: + config.NOTIFICATION_VRC_SFX = False + return {"status":200, "result":config.NOTIFICATION_VRC_SFX} + @staticmethod def getDeepLAuthKey(*args, **kwargs) -> dict: return {"status":200, "result":config.AUTH_KEYS["DeepL_API"]} diff --git a/src-python/mainloop.py b/src-python/mainloop.py index e2dabbfc..cd50a503 100644 --- a/src-python/mainloop.py +++ b/src-python/mainloop.py @@ -295,6 +295,10 @@ mapping = { "/get/data/osc_port": {"status": True, "variable":controller.getOscPort}, "/set/data/osc_port": {"status": True, "variable":controller.setOscPort}, + "/get/data/notification_vrc_sfx": {"status": True, "variable":controller.getNotificationVrcSfx}, + "/set/enable/notification_vrc_sfx": {"status": True, "variable":controller.setEnableNotificationVrcSfx}, + "/set/disable/notification_vrc_sfx": {"status": True, "variable":controller.setDisableNotificationVrcSfx}, + "/run/open_filepath_config_file": {"status": True, "variable":controller.openFilepathConfigFile}, # "/run/start_watchdog": {"status": True, "variable":controller.startWatchdog}, diff --git a/src-python/model.py b/src-python/model.py index b6a416b4..f393314d 100644 --- a/src-python/model.py +++ b/src-python/model.py @@ -289,8 +289,8 @@ class Model: def oscStopSendTyping(self): self.osc_handler.sendTyping(flag=False) - def oscSendMessage(self, message, notification=True): - self.osc_handler.sendMessage(message=message, notification=notification) + def oscSendMessage(self, message:str): + self.osc_handler.sendMessage(message=message, notification=config.NOTIFICATION_VRC_SFX) def getMuteSelfStatus(self): return self.osc_handler.getOSCParameterMuteSelf() From 1ca14ca33e0795b9110b01d5b78531e30ab0f111 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:30:48 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9B[bugfix]=20model=20:=20overlay?= =?UTF-8?q?=E5=8B=95=E4=BD=9C=E6=99=82=E3=81=ABoverlay=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=83=87=E3=83=90=E3=82=A4=E3=82=B9=E3=81=8C=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=AB=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit デバイスの存在チェックを追加 --- src-python/models/overlay/overlay.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src-python/models/overlay/overlay.py b/src-python/models/overlay/overlay.py index 71df4c98..a3abfdec 100644 --- a/src-python/models/overlay/overlay.py +++ b/src-python/models/overlay/overlay.py @@ -198,11 +198,12 @@ class Overlay: transform = utils.transform_matrix(base_matrix, translation, rotation) transform = mat34Id(transform) - self.overlay.setOverlayTransformTrackedDeviceRelative( - self.handle[size], - trackerIndex, - transform - ) + if bool(self.overlay_system.isTrackedDeviceConnected(trackerIndex)) is True: + self.overlay.setOverlayTransformTrackedDeviceRelative( + self.handle[size], + trackerIndex, + transform + ) def updateDisplayDuration(self, display_duration, size): self.settings[size]["display_duration"] = display_duration From 6fe403315a5170284c88b657de4f322dfdb60827 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:33:45 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9B[bugfix]=20model=20:=20overlay?= =?UTF-8?q?=20200=E5=9B=9E=E8=A1=A8=E7=A4=BA=E5=BE=8C=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E5=87=A6=E7=90=86=E3=81=A7=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=97=E3=81=9F?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=AE=E3=81=BF=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=92=E4=BF=9D=E5=AD=98=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/models/overlay/overlay.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src-python/models/overlay/overlay.py b/src-python/models/overlay/overlay.py index a3abfdec..92c24ab9 100644 --- a/src-python/models/overlay/overlay.py +++ b/src-python/models/overlay/overlay.py @@ -128,11 +128,14 @@ class Overlay: try: self.overlay.setOverlayRaw(self.handle[size], img, width, height, 4) except Exception: - errorLogging() self.reStartOverlay() while self.initialized is False: time.sleep(0.1) - self.overlay.setOverlayRaw(self.handle[size], img, width, height, 4) + try: + self.overlay.setOverlayRaw(self.handle[size], img, width, height, 4) + except Exception: + errorLogging() + self.updateOpacity(self.settings[size]["opacity"], size) self.lastUpdate[size] = time.monotonic() From fd0069cb6ba0e76018674f0319804a5d8f8a1f86 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:36:08 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[Update]=20UI:=20VRC=20ChatBox=E3=81=AE?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=9F=B3=E3=81=AEON/OFF=20=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E9=A0=85=E7=9B=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/en.yml | 3 ++ locales/ja.yml | 3 ++ .../setting_box/others/Others.jsx | 20 +++++++++++++ src-ui/logics/configs/index.js | 1 + .../others/useEnableNotificationVrcSfx.js | 28 +++++++++++++++++++ src-ui/logics/useReceiveRoutes.js | 6 ++++ src-ui/store.js | 1 + 7 files changed, 62 insertions(+) create mode 100644 src-ui/logics/configs/others/useEnableNotificationVrcSfx.js diff --git a/locales/en.yml b/locales/en.yml index 73ba1ed0..2879e404 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -239,6 +239,7 @@ config_page: label: Show Only Translated Messages others: + section_label_sounds: Sounds auto_clear_the_message_box: label: Auto Clear The Message Box send_only_translated_messages: @@ -254,6 +255,8 @@ config_page: send_message_to_vrc: label: Send Message To VRChat desc: There is a way to use it without sending messages to VRChat, but it is not supported. Enable this feature when you intend to send a message to VRChat. + notification_vrc_sfx: + label: Enable Notification Sound When Sending Chat send_received_message_to_vrc: label: Send Received Message To VRChat desc: Send the message you received from the speaker's sound to VRChat's chatbox. diff --git a/locales/ja.yml b/locales/ja.yml index 1218ef08..4603d81e 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -237,6 +237,7 @@ config_page: label: 翻訳後のメッセージのみ表示する others: + section_label_sounds: サウンド auto_clear_the_message_box: label: 送信後はチャットボックスを空にする send_only_translated_messages: @@ -252,6 +253,8 @@ config_page: send_message_to_vrc: label: VRChatにメッセージを送信する desc: サポート対象外ですが、VRChatにメッセージを送信せずに使う方法があります。送信したい場合、この機能を有効にする事を忘れないでください。 + notification_vrc_sfx: + label: チャット送信時に音を鳴らさない send_received_message_to_vrc: label: 受信したメッセージをVRChatに送信する desc: スピーカーから聞き取り、文字起こしされたメッセージをVRChatに送信します。 diff --git a/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx b/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx index f1e9a251..25fa5495 100644 --- a/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx +++ b/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx @@ -9,6 +9,7 @@ import { useEnableVrcMicMuteSync, useEnableSendMessageToVrc, useEnableSendReceivedMessageToVrc, + useEnableNotificationVrcSfx, } from "@logics_configs"; import { @@ -25,6 +26,8 @@ import { Checkbox } from "@common_components"; import OpenFolderSvg from "@images/open_folder.svg?react"; export const Others = () => { + const { t } = useTranslation(); + return (