Quantcast
Download
(16 Kb)
Download
Updated: 07-19-16 08:29 AM
Pictures
File Info
Compatibility:
Legion Pre-Patch (7.0.3)
Updated:07-19-16 08:29 AM
Created:unknown
Downloads:83,541
Favorites:239
MD5:
Categories:Graphic UI Mods, Unit Mods
7.0.3

Adapt - Almost-Default Animated Portraits  Popular! (More than 5000 hits)

Version: 2.2.2
by: Gello [More]

This small addon animates the static portraits of (nearly) any UI.

When the UI goes to draw a static portrait, this addon instead draws an animated model to the dimensions of the intended portrait.

Adapt is meant to be configuration-free (especially if you use the default unit frames), but there are some options you can change in the Interface Options Panel.

__ FAQ __

Q: Will it work with my custom unit frames?
A: If your existing unit frames are static portraits and not models already, yes it should. The universal approach this addon takes will attempt to convert any 2d portrait texture into a 3d model (if it's bigger than 30 pixels). However, if Adapt already came with the unit frame addon or UI compilation you use, you may need to get an updated version of that addon/compilation if it made any tweaks to portraits/Adapt.

Q: It's not working or there's a bug.
A: I'd love to hear about it in the comments. Please mention what Unit Frame addon or UI compilation you use.

Q: I use circular unit frames (like default), but when I look closely the model cut off as a square! Can the model be fit into a true circle?
A: Sadly, it can't. Addons have no genuine way to mask models. For circular unit frames the model is shrunk to fit within the circle.

Q: What's an "anonymous portrait"?
A: When this addon was first written in 2006, practically everyone named all their textures(portraits). Nowadays it's more common for textures to go unnamed as a courtesy to the UI ecosystem. For anonymous portraits you can only turn them all on or off, unlike named portraits which you can selectively disable.

Q: I want to disable my default focus frame from animating, but I don't see it in the options list.
A: The list in options is only of portraits it's encountered in that session (and those already disabled). Adapt has no awareness of what frames it will be asked to draw until it encounters them. So in this case you can /focus yourself and then when you go back into options the focus frame should be listed so you can disable it.

07/03/2016 version 2.2.2
- Also workaround for UNIT_MODEL_CHANGED not firing when a player unghosts, causing their model to remain in ghostly form.

07/03/2016 version 2.2.1
- Workaround for UNIT_MODEL_CHANGED not firing when a warrior finishes "leap" out of Skyhold, causing fiery/explody model to continue.

05/14/2016 version 2.2.0
- toc update for 7.0 Legion Beta
- Fix for first render not working on a new model

01/21/2016 version 2.1.0
- Rewrote options panel.
- Restructured settings (some with non-standard settings may need to set them back).
- Added new option "With Overlay Mask" to add a circular texture over models to soften the corners and make them more round.
- Added new option "Smaller Portrait" to bring round portraits in even further.
- "Torso Portrait" mode reworked: model turned to "default rotation" and zoomed in just a bit for a more natural view.
- "Full Model" mode zoomed in a bit.
- All animations now (theoretically) use a standing animation without idle animations (such as undead going off camera).
- Fixed camera issue when changing the UI scale or display size.

2.0.17 01/15/16 brought corners in slightly for "circle" portraits
2.0.16 06/23/15 toc update for 6.2 patch
2.0.15 02/24/15 toc update for 6.1 patch
2.0.14 10/30/14 fix for frames being removed from blacklist staying on blacklist
2.0.13 10/29/14 fix for achievement comparison portrait
2.0.12 10/14/14 toc update for 6.0 patch
2.0.11 4/9/14 torso portrait option
2.0.10 10/27/13 fix for blacklisted portraits belonging to an addon that later gets disabled
2.0.9 09/11/13 toc update for 5.4 patch
2.0.8 05/21/13 toc update for 5.3 patch
2.0.7 04/04/13 added blacklist cache, removed debug code
2.0.6 03/30/13 rewrite
- portraits indexed by the texture itself, not the texture name
- instead of a frame with back and model drawn off it, back and model drawn straight to parent of original texture.
- useParentLevel inherited by models
- setCamera replaced with SetPortraitZoom
- instead of reacting to every SetPortraitTexture, a SetUnit done only if the GUID changed. At the same time, if a UNIT_MODEL_CHANGED happens, every portrait of that unit will be updated at a lower priority update.
- rebuilt options frame
1.92 08/28/12 fixed _ tainting
1.91 08/27/12 5.0 (Mists of Pandaria) update
1.9 09/02/10 4.0 (Cataclysm) support, TargetFrameToTPortrait defaulted DontUse
1.82 10/08/08 scroll fix, /adapt goes to options panel
1.81 08/08/08 updated for WotLK (toc, this->self)
1.8 04/12/08 moved options to new interface options, added full model option
1.71 01/12/07 fixed initialization
1.7 01/11/07 fixed taint issue with default ToT
1.6 10/04/06 edits for lua 5.1
1.5 08/21/06 changed DressUpModel to PlayerModel, moved SetCamera OnUpdate to OnShow
1.4 06/22/06 disabled mouse on portraits, added known frames to /adapt list
1.3 06/11/06 /adapt animate/unanimate options, visibility fix by Lafiell, attempt at more flexibility with frameStrata
1.2 04/01/06 slash options added for circle/square portraits and background
1.0 03/19/06 initial release
Optional Files (0)


Archived Files (17)
File Name
Version
Size
Author
Date
2.1.0
16kB
Gello
01-21-16 09:16 PM
2.0.17
12kB
Gello
01-15-16 12:12 PM
2.0.16
12kB
Gello
06-23-15 07:51 AM
2.0.15
12kB
Gello
02-24-15 06:17 AM
2.0.14
12kB
Gello
10-29-14 11:04 PM
2.0.13
12kB
Gello
10-29-14 09:53 AM
2.0.12
12kB
Gello
10-14-14 06:28 AM
2.0.11
12kB
Gello
04-09-14 07:31 PM
2.0.10
10kB
Gello
10-27-13 03:21 PM
2.0.9
10kB
Gello
09-11-13 10:12 AM
2.0.8
10kB
Gello
05-21-13 11:18 AM
2.0.7
10kB
Gello
04-04-13 11:32 AM
2.0.6
10kB
Gello
03-29-13 11:24 PM
1.92
12kB
Gello
08-28-12 04:36 PM
1.91
12kB
Gello
08-27-12 08:34 PM
1.9
12kB
Gello
01-30-12 06:53 AM
1.82
10kB
Gello
10-14-08 04:43 AM


Post A Reply Comment Options
Unread 08-03-16, 07:22 PM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
Originally Posted by ThSno
I tested Adapt alone, without oUF_Abu, and portraits are not animated at all while in a vehicle, even after reloading UI. When I use both, I have to reload when entering and then when exiting vehicle to make it work. Everything besides that works perfectly, so I don't understand why I would not be compatible...
I asked for help on the oUF_Abu post, though.
Vehicles are a real pain to work with. Every time I get an itch to write a unit frame addon, I remember that vehicles exist and scrap the idea. That 2d portraits are used while in a vehicle is 100% perfectly fine with me.

How Adapt works is it hooks the SetPortraitTexture API call that the default UI (and addons) use to create a portrait of a unit, and then creates a model for that until instead, using the corners of the intented texture to size and position the new model and making the texture's parent the model's parent. That's it. The code is something like 250 lines to actually do this and another 500 lines of code for options. This "blind" universal approach cannot make judgement calls about the behavior of the frames they're attached to.

I've put this on the todo list to research this further later. Maybe this addon can be made to work with vehicles without requiring it to be for default unit frames only. I think the basic problem is that the unit is changing and it doesn't handle units changing. But unfortunately I have a lot of addon work to do between now and Legion and need to prioritize what gets my attention.
Report comment to moderator  
Reply With Quote
Unread 08-03-16, 06:00 PM  
ThSno
A Kobold Labourer

Forum posts: 0
File comments: 12
Uploads: 0
Originally Posted by Gello
Originally Posted by ThSno
Hello,

I'm currently using your addon with oUF_Abu and I found a bug while in a vehicle. The portrait won't show in the right place unless I reload UI, and it won't be animated anymore right after I exit the vehicle. I don't know if you can do anything about it.
Thanks for the screenshots. I'll look into that tonight.

edit: I had a chance to look into it. I'm afraid the two are incompatable. You'll have to get the models through oUF or oUF_Abu. I don't have the time to research how oUF is doing things differently to begin finding out exactly what's happening.
I tested Adapt alone, without oUF_Abu, and portraits are not animated at all while in a vehicle, even after reloading UI. When I use both, I have to reload when entering and then when exiting vehicle to make it work. Everything besides that works perfectly, so I don't understand why I would not be compatible...
I asked for help on the oUF_Abu post, though.
Report comment to moderator  
Reply With Quote
Unread 08-03-16, 11:36 AM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
Originally Posted by ThSno
Hello,

I'm currently using your addon with oUF_Abu and I found a bug while in a vehicle. The portrait won't show in the right place unless I reload UI, and it won't be animated anymore right after I exit the vehicle. I don't know if you can do anything about it.
Thanks for the screenshots. I'll look into that tonight.

edit: I had a chance to look into it. I'm afraid the two are incompatable. You'll have to get the models through oUF or oUF_Abu. I don't have the time to research how oUF is doing things differently to begin finding out exactly what's happening.
Last edited by Gello : 08-03-16 at 04:22 PM.
Report comment to moderator  
Reply With Quote
Unread 08-03-16, 03:39 AM  
ThSno
A Kobold Labourer

Forum posts: 0
File comments: 12
Uploads: 0
Hello,

I'm currently using your addon with oUF_Abu and I found a bug while in a vehicle. The portrait won't show in the right place unless I reload UI, and it won't be animated anymore right after I exit the vehicle. I don't know if you can do anything about it.

Last edited by ThSno : 08-03-16 at 04:54 AM.
Report comment to moderator  
Reply With Quote
Unread 07-21-16, 10:29 AM  
prophetik
A Kobold Labourer
 
prophetik's Avatar

Forum posts: 0
File comments: 22
Uploads: 0
Thank you for keeping this updated over the years!
Report comment to moderator  
Reply With Quote
Unread 05-14-16, 07:32 PM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
If anyone is looking for a version of Adapt for the Legion beta, you can find it here.
Report comment to moderator  
Reply With Quote
Unread 03-02-16, 12:34 PM  
Deadlyz
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 35
File comments: 188
Uploads: 2
Thanks for a quick reply
Originally Posted by Gello
- The old SetCamera that this addon used to use is an option, but it had issues like worgen and others showing as full model instead of a typical head profile.
- A custom camera to set a position closer, but this would probably require a database of coordinates for different models. This addon is super tiny (<50k) and any such database of absolutely off the table.
- Use the 1.2 SetPortraitZoom and rotate the model a little to the right. If it's a player character model it can rotate a little, and for non-player character models it can rotate even more. I'd have to experiment on the specifics and range of behavior which is an amount of research I don't have time to commit to at the moment, sorry.
Sounds complicated!
Originally Posted by Gello
In the future I may research more on models (it's all very poorly documented, so 90% of work is by experimentation), but for the moment this addon won't help your problem.
Guess I'll keep looking

Found some addon that replaces player's portrait with a custom image.
http://www.wowinterface.com/downloads/info19596-MinyonsCoolFaceampClassPortraits.html
Not sure if it's still working.
__________________

My last movie: Rogue Sweethearts
Last edited by Deadlyz : 06-04-16 at 03:26 AM.
Report comment to moderator  
Reply With Quote
Unread 03-02-16, 08:33 AM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
Originally Posted by Deadlyz
I'm asking you: is it possible to add an option to move, zoom in/out and rotate character's model in the player frame to set a custom static (or even animated) player portrait?
Yes and no.

If you open Adapt.lua and find this bit of code (can ctrl+F for SetCamera and it's the second instance of SetCamera in the file):
Code:
function adapt.SetCamera(texture)
  local zoom = AdaptSettings.Zoom==3 and 0.33 or AdaptSettings.Zoom==2 and 0.75 or 1
  adapt.portraits[texture].modelLayer:SetPortraitZoom(zoom)
end
and change the "or 1" to "or 1.2" it will zoom the camera in a bit more, but it also rotates the character to the model's left a bit.

This has two effects:
1) Since models can't be properly masked into circles, the "squared edges" problem becomes more pronounced. The circular overlay mask softens the corners a bit, but it looks imperfect.
2) NPC models seem to have a different "scale" for this zoom-rotation, so you're looking at the back of the heads for some targets.

There are alternatives:
- The old SetCamera that this addon used to use is an option, but it had issues like worgen and others showing as full model instead of a typical head profile.
- A custom camera to set a position closer, but this would probably require a database of coordinates for different models. This addon is super tiny (<50k) and any such database of absolutely off the table.
- Use the 1.2 SetPortraitZoom and rotate the model a little to the right. If it's a player character model it can rotate a little, and for non-player character models it can rotate even more. I'd have to experiment on the specifics and range of behavior which is an amount of research I don't have time to commit to at the moment, sorry.

In the future I may research more on models (it's all very poorly documented, so 90% of work is by experimentation), but for the moment this addon won't help your problem.

Sorry!
Report comment to moderator  
Reply With Quote
Unread 03-02-16, 12:24 AM  
Deadlyz
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 35
File comments: 188
Uploads: 2
Hi!

Gello, blizzard developers have been ignoring the portrait bug since WoD release, so I'm asking you: is it possible to add an option to move, zoom in/out and rotate character's model in the player frame to set a custom static (or even animated) player portrait?

I was hoping your addon would help me fix those ugly shrunken character portraits Blizz released with WoD expansion.
My thread on the official forum: http://eu.battle.net/wow/en/forum/topic/17288990190



But.. it turned out that Adapt's animated portrait looks even tinier than the default one



Honestly I don't really like animated portraits. They can be really distracting!
__________________

My last movie: Rogue Sweethearts
Last edited by Deadlyz : 03-02-16 at 12:27 AM.
Report comment to moderator  
Reply With Quote
Unread 01-21-16, 09:37 PM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
Just a heads up for the update posted tonight (2.1.0 on January 21, 2016): If you find your options seem to have reset, go back into options and set them back. There are a couple new options there too. (I try very hard not to reset options on users; but this addon has been around for over 9 years so it's due for a little savedvar cleanup. )

Also this update removes a file and adds two files. You will need to do the update while exited out of the game. If you do an update while logged in, it will error. Just exit the game and log back in to fix everything.
Report comment to moderator  
Reply With Quote
Unread 10-29-14, 10:55 PM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
Originally Posted by Banknorris
I found the problem, my saved variables were:
AdaptSettings = {
["BackColor"] = {
["a"] = 1,
["b"] = 0.5,
["g"] = 0.5,
["r"] = 0.5,
},
["BlacklistAnonymous"] = false,
["ColorByClass"] = 1,
["ModelZoom"] = 1,
["Blacklist"] = {
["PlayerPortrait"] = false,
},
}
When i deleted the saved variables the TargetPortrait started animation again. But I think there is some bug in your code assigning false instead of nil (or checking for nil instead of false). And yes just disabling the compareachievement frame is more than good enough. Thank you and sorry for pointing out such a little thing lol.
Nice find, thanks!

You're exactly right with the nil/false. It builds a cache from the blacklist
Code:
for texture in pairs(AdaptSettings.Blacklist) do
  if _G[texture] then
    adapt.Blackcache[_G[texture]] = 1
  end
end
So PlayerPortrait=false will add PlayerPortrait to the Blackcache.

The culprit is GetChecked() will return false now instead of nil. This is easy enough to fix. Thanks again!
Report comment to moderator  
Reply With Quote
Unread 10-29-14, 04:34 PM  
Banknorris
A Flamescale Wyrmkin
 
Banknorris's Avatar
AddOn Author - Click to view AddOns

Forum posts: 117
File comments: 5
Uploads: 7
I found the problem, my saved variables were:
AdaptSettings = {
["BackColor"] = {
["a"] = 1,
["b"] = 0.5,
["g"] = 0.5,
["r"] = 0.5,
},
["BlacklistAnonymous"] = false,
["ColorByClass"] = 1,
["ModelZoom"] = 1,
["Blacklist"] = {
["PlayerPortrait"] = false,
},
}
When i deleted the saved variables the TargetPortrait started animation again. But I think there is some bug in your code assigning false instead of nil (or checking for nil instead of false). And yes just disabling the compareachievement frame is more than good enough. Thank you and sorry for pointing out such a little thing lol.
Last edited by Banknorris : 10-29-14 at 04:35 PM.
Report comment to moderator  
Reply With Quote
Unread 10-29-14, 08:49 AM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
I can't figure out how to get back to that bug report Banknorris sorry. Is your player portrait still not showing? If so is it just for one character or all?

I'll have an update today to turn off the animation of that achievement compare portrait.

edit: figured out how to get back there. Sorry didn't reply earlier. I'll have a fix for the achievement comparison. Probably just disable the model--the way this addon works passively it makes no judgement on the unit it's about to draw. It just passes the unit along. When I get time I'll see if I can experiment with why it's getting the wrong unit.
Last edited by Gello : 10-29-14 at 08:57 AM.
Report comment to moderator  
Reply With Quote
Unread 10-25-14, 05:03 PM  
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 566
File comments: 421
Uploads: 21
Just a quick plugin here (a month late) Gello, BobUI no longer uses adapt as the unitframes are now oUF based as of version 6.0

The older files are still available for download however the unitframes.lua file is required as my custom textures I used the the unitframes don't match the default layout.

If peopl are going to use my textures I suggest using BobUI v5.4.1 as that was the last interation of the texture were I fixed a lot of texture issues. I do allow fan updates in the license as well if players would just like to update the UI so long as it's posted on wowinterface or curse.com (and associated websites aka curseforge, wowace, ect)
Report comment to moderator  
Reply With Quote
Unread 09-27-14, 12:00 PM  
Gello
A Firelord
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 463
Uploads: 116
WoD

Just a note that this addon has been tested on the WoD beta and appears to require no changes beyond changing its interface number to make it up to date.

That will happen with the 6.0 pre-patch. A WoD-specific version will not be uploaded until then unless there's any demand.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: