GetTexture() returns nil on unloaded textures
1 Attachment(s)
I've been trying to fix Xinhuan's LargerMacroIconSelection (WowAce)
The license is All Rights Reserved though... For some reason GetTexture() returns nil on anonymous texture objects?
MacroFrame/MacroPopup-TopLeft.PNG Code:
<Texture file="Interface\MacroFrame\MacroPopup-TopLeft"> Code:
/run UIParentLoadAddOn("Blizzard_MacroUI")
Code:
kids = {MacroPopupFrame:GetRegions()} Code:
for _, child in ipairs(kids) do Not sure if this is a bug or not and if it's in the right forum. (I'm a noob with texture stuff)
|
Actually, if this is the UI forum for Blizzard then I'd like to move this thread into the AddOn Help & Feedback category. Sorry.
http://www.wowinterface.com/forums/f...play.php?f=155 |
Currently, it appears that the texture has to be visible to request the texture and get a result. It's probably getting unloaded when hidden.
Works: /dump UIParentLoadAddOn("Blizzard_MacroUI"), ShowUIPanel(MacroPopupFrame), ({MacroPopupFrame:GetRegions()})[1]:GetTexture() Doesn't work: /dump UIParentLoadAddOn("Blizzard_MacroUI"), ({MacroPopupFrame:GetRegions()})[1]:GetTexture() |
Thanks lucro, showing the textures fixed the problem!
I don't know if it already was documented, but the texture paths returned now also included the .blp extension I'm showing their parent frame MacroPopupFrame and then hiding it again. Is that a good way to go about it? Followup edit: (June 29) http://www.wowinterface.com/forums/s...ad.php?t=53795 Code:
kids = {MacroPopupFrame:GetRegions()} |
Yeah, hopefully it gets changed back to the way it works on live, but that seems the way to go currently.
|
Seems intentional, I doubt it will be removed. See CVar releaseUITextures: "Release Hidden UI Textures by default"
|
In the latest beta build it appears the CVar was removed. The texture paths/ids are now being returned even if the texture is hidden.
|
Quote:
Oh well, that means a lot less broken addons :) It did make some addons more efficient, if they only did stuff at OnShow |
It looks like the textures are still being released on hide. Basically the cvar is always set to 1. We just can't turn it off.
|
All times are GMT -6. The time now is 03:36 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI