Add menu item that disables adjusting eyelids to follow pupil
Unified · Split
| @@ -444,6 +444,7 @@ Menu::Menu() { · 443 unmodified lines | |||
| 444 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderFocusIndicator, 0, false); | 444 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderFocusIndicator, 0, false); |
| 445 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowWhosLookingAtMe, 0, false); | 445 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowWhosLookingAtMe, 0, false); |
| 446 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false); | 446 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false); |
| 447 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::DisableEyelidAdjustment, 0, false); | ||
| 447 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, | 448 | addCheckableActionToQMenuAndActionHash(avatarDebugMenu, |
| 448 | MenuOption::Connexion, | 449 | MenuOption::Connexion, |
| 449 | 0, false, | 450 | 0, false, |
| @@ -168,6 +168,7 @@ namespace MenuOption { · 167 unmodified lines | |||
| 168 | const QString DecreaseAvatarSize = "Decrease Avatar Size"; | 168 | const QString DecreaseAvatarSize = "Decrease Avatar Size"; |
| 169 | const QString DeleteBookmark = "Delete Bookmark..."; | 169 | const QString DeleteBookmark = "Delete Bookmark..."; |
| 170 | const QString DisableActivityLogger = "Disable Activity Logger"; | 170 | const QString DisableActivityLogger = "Disable Activity Logger"; |
| 171 | const QString DisableEyelidAdjustment = "Disable Eyelid Adjustment"; | ||
| 171 | const QString DisableLightEntities = "Disable Light Entities"; | 172 | const QString DisableLightEntities = "Disable Light Entities"; |
| 172 | const QString DisableNackPackets = "Disable Entity NACK Packets"; | 173 | const QString DisableNackPackets = "Disable Entity NACK Packets"; |
| 173 | const QString DiskCacheEditor = "Disk Cache Editor"; | 174 | const QString DiskCacheEditor = "Disk Cache Editor"; |
| @@ -277,6 +277,10 @@ void Head::calculateMouthShapes() { · 276 unmodified lines | |||
| 277 | void Head::applyEyelidOffset(glm::quat headOrientation) { | 277 | void Head::applyEyelidOffset(glm::quat headOrientation) { |
| 278 | // Adjusts the eyelid blendshape coefficients so that the eyelid follows the iris as the head pitches. | 278 | // Adjusts the eyelid blendshape coefficients so that the eyelid follows the iris as the head pitches. |
| 279 | 279 | ||
| 280 | if (Menu::getInstance()->isOptionChecked(MenuOption::DisableEyelidAdjustment)) { | ||
| 281 | return; | ||
| 282 | } | ||
| 283 | |||
| 280 | glm::quat eyeRotation = rotationBetween(headOrientation * IDENTITY_FRONT, getLookAtPosition() - _eyePosition); | 284 | glm::quat eyeRotation = rotationBetween(headOrientation * IDENTITY_FRONT, getLookAtPosition() - _eyePosition); |
| 281 | eyeRotation = eyeRotation * glm::angleAxis(safeEulerAngles(headOrientation).y, IDENTITY_UP); // Rotation w.r.t. head | 285 | eyeRotation = eyeRotation * glm::angleAxis(safeEulerAngles(headOrientation).y, IDENTITY_UP); // Rotation w.r.t. head |
| 282 | float eyePitch = safeEulerAngles(eyeRotation).x; | 286 | float eyePitch = safeEulerAngles(eyeRotation).x; |