Repository navigation
bugfix(raidframes): auto-scale portraits for druid forms - #3422
Open
TzahalHPal wants to merge 1 commit into
Open
TzahalHPal wants to merge 1 commit into
TzahalHPal wants to merge 1 commit into
Conversation
Adds an opt-in Auto-Scale Portraits toggle (default off) to the party Portrait Zoom cog. Above 3D Zoom 300, models longer or wider than they are tall (druid bear, cat and travel forms, ghost wolf) get a camera distance and placement that size them like a character; characters keep the game's own camera. Each model file is measured once on an off-screen probe actor. The fit runs one frame after a model load or zoom change, never moves the camera under a moved model, and nothing is registered while the option is off.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an Auto-Scale Portraits toggle to the Party panel's Portrait Zoom cog (Raid & Party Frames → Party → Portrait → the cog on Size). It is off by default.
With Art Style set to 3D Portrait and 3D Zoom above 300, the game frames a character by its height. Creature-shaped models get their camera from their own creature data instead. Druid forms such as bear, cat and travel form come out much bigger or smaller than the characters next to them, often off-centre. A travel form's camera, for example, sits about twice as close as a character's and aims at its feet.
With the toggle on, any model that is longer or wider than it is tall is sized and centred like a character, blended in from 3D Zoom 300 to 500. Models at least as tall as they are long and wide keep the game's own camera exactly. That covers player characters and upright forms like Moonkin. Works in retail and WoW Forever.
How was it tested?
In game (retail and WoW Forever, v9.8.7 with this change; v9.8.8 doesn't change either file):
Offline (Lua 5.1 harness with a fake client, against the stock v9.8.7 / v9.8.8 portrait file):
.tools/guardrails.pypasses, and.tools/extract-locale-keys.shreports no new keys.Screenshots
The option
Checklist
C_Timer.After(0)call (with a pending flag, like ClickCast) reads the camera on the next frame, because the game moves its camera a frame after a load or zoom change.HookScript/hooksecurefunconly, neverSetScripton Blizzard framesissecretvalue.