Skip to content

Native Windows video motion capture with ExMR, FlowHMR and GVHMR, contact correction, humanoid retargeting, and FBX/VMD export.

Python

Set application window and taskbar icon

toyxyz0521052676c2
diff --git a/SOURCE_MANIFEST.json b/SOURCE_MANIFEST.json
index 7185385..0e35f43 100644
--- a/SOURCE_MANIFEST.json
+++ b/SOURCE_MANIFEST.json
@@ -36,8 +36,8 @@
},
{
"path": "app.py",
- "bytes": 3851,
- "sha256": "2edafc13db292074489392e372adb639a43ae9e48bd587b6f6269047090366d0"
+ "bytes": 4294,
+ "sha256": "9eac82d35698e304cb8e85424f4cf517cf29187f4a56ac1b4a210a922af846c1"
},
{
"path": "assets/fonts/NotoSansKR.ttf",
@@ -64,6 +64,11 @@
"bytes": 139,
"sha256": "192ac38e467f7688e70fbe6fd46316c80e3a740004ef3fbddbec970f61d88cfe"
},
+ {
+ "path": "assets/rgbmocap-icon.png",
+ "bytes": 5246,
+ "sha256": "dd979b5fc133646599fbee417048997b6114088f2eb257b3ed6f61df24545e89"
+ },
{
"path": "contributors/motion-correction/README.md",
"bytes": 1919,
diff --git a/app.py b/app.py
index 8ee025a..53ee69b 100644
--- a/app.py
+++ b/app.py
@@ -21,11 +21,20 @@ def main():
parser.add_argument('--smoke-render-mode',choices=['raw','box','mixamo'],default='box',help=argparse.SUPPRESS)
parser.add_argument('--smoke-bone-overlay',choices=['on','off'])
args = parser.parse_args()
+ # Give Windows a stable app identity so the taskbar uses the app icon.
+ if sys.platform == "win32":
+ try:
+ import ctypes
+ ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("toyxyz.RGBMoCap")
+ except (AttributeError, OSError):
+ pass
from PySide6.QtWidgets import QApplication
+ from PySide6.QtGui import QIcon
from PySide6.QtCore import QTimer
from mocap.gui import MainWindow
from mocap.theme import configure_application
app = QApplication(sys.argv[:1])
+ app.setWindowIcon(QIcon(str(Path(__file__).resolve().parent / "assets" / "rgbmocap-icon.png")))
configure_application(app)
window = MainWindow(args.video)
window.bone_overlay.setChecked(args.smoke_bone_overlay=='on' if args.smoke_bone_overlay else args.smoke_render_mode!='raw')
diff --git a/assets/rgbmocap-icon.png b/assets/rgbmocap-icon.png
new file mode 100644
index 0000000..66d3296
Binary files /dev/null and b/assets/rgbmocap-icon.png differ