mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
force correct eye layout (left on left side)
This commit is contained in:
parent
65dcd86182
commit
aa95985eab
@ -87,13 +87,6 @@ def main():
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Column(
|
||||
eyes[0].widget_layout,
|
||||
vertical_alignment="top",
|
||||
key=RIGHT_EYE_NAME,
|
||||
visible=(config.eye_display_id in [EyeId.RIGHT, EyeId.BOTH]),
|
||||
background_color='#424042',
|
||||
),
|
||||
sg.Column(
|
||||
eyes[1].widget_layout,
|
||||
vertical_alignment="top",
|
||||
@ -101,6 +94,13 @@ def main():
|
||||
visible=(config.eye_display_id in [EyeId.LEFT, EyeId.BOTH]),
|
||||
background_color='#424042',
|
||||
),
|
||||
sg.Column(
|
||||
eyes[0].widget_layout,
|
||||
vertical_alignment="top",
|
||||
key=RIGHT_EYE_NAME,
|
||||
visible=(config.eye_display_id in [EyeId.RIGHT, EyeId.BOTH]),
|
||||
background_color='#424042',
|
||||
),
|
||||
sg.Column(
|
||||
settings[0].widget_layout,
|
||||
vertical_alignment="top",
|
||||
@ -111,15 +111,16 @@ def main():
|
||||
],
|
||||
]
|
||||
|
||||
if config.eye_display_id in [EyeId.RIGHT, EyeId.BOTH]:
|
||||
eyes[0].start()
|
||||
if config.eye_display_id in [EyeId.LEFT, EyeId.BOTH]:
|
||||
eyes[1].start()
|
||||
if config.eye_display_id in [EyeId.RIGHT, EyeId.BOTH]:
|
||||
eyes[0].start()
|
||||
|
||||
if config.eye_display_id in [EyeId.SETTINGS, EyeId.BOTH]:
|
||||
settings[0].start()
|
||||
|
||||
# Create the window
|
||||
window = sg.Window("EyeTrackVR v0.1.6", layout, icon='Images/logo.ico', background_color='#292929')
|
||||
window = sg.Window("EyeTrackVR v0.1.7", layout, icon='Images/logo.ico', background_color='#292929')
|
||||
|
||||
# GUI Render loop
|
||||
while True:
|
||||
@ -161,10 +162,12 @@ def main():
|
||||
config.save()
|
||||
elif values[BOTH_EYE_RADIO_NAME] and config.eye_display_id != EyeId.BOTH:
|
||||
settings[0].stop()
|
||||
eyes[0].stop()
|
||||
eyes[1].start()
|
||||
eyes[0].start()
|
||||
window[RIGHT_EYE_NAME].update(visible=True)
|
||||
|
||||
window[LEFT_EYE_NAME].update(visible=True)
|
||||
window[RIGHT_EYE_NAME].update(visible=True)
|
||||
window[SETTINGS_NAME].update(visible=False)
|
||||
config.eye_display_id = EyeId.BOTH
|
||||
config.settings.tracker_single_eye = 0
|
||||
|
||||
@ -88,9 +88,7 @@ class VRChatOSC:
|
||||
lb = True
|
||||
if eye_id in [EyeId.RIGHT]:
|
||||
rb = True
|
||||
print(lb, rb)
|
||||
if rb == True or lb == True: # If one eye closed and fall off is enabled, mirror data
|
||||
print(sx, sy)
|
||||
self.client.send_message("/avatar/parameters/LeftEyeX", sx) #Send mirrored data to both eyes.
|
||||
self.client.send_message("/avatar/parameters/RightEyeX", sx)
|
||||
self.client.send_message("/avatar/parameters/EyesY", sy)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user