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