Quantcast Addon causing UI elements to turn transparent - WoWInterface
Thread Tools Display Modes
08-10-16, 09:15 PM   #1
Galaxy119
A Cliff Giant
 
Galaxy119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 78
Addon causing UI elements to turn transparent

This may be a more general lua question, but I haven't had ANY luck in that forum, seeing as how my addon uses oUF maybe someone here can help...

So this is a new bug that popped up with the legion pre-patch.
Before the pre-patch everything worked peachy and perfect. Now, not so much.

I have an addon that replaces the player frame with health and power orbs. (diablo 3 style).
I also have a neat little animation option that puts one of a number of choosable animations ontop of the standard orb texture, to give alot more flavor and customizability to it.

Unfortunately, for some reason as of 7.0.3, whenever the UI is reloaded (through /reload or zone change) if the orb displaying an animation is not 100% full, it glitches the UI, turning basically everything transparent (see screenshot) aside from the addon's artwork and the primary actionbar.

Also the animation of the orbs doesn't appear to "unfill" properly when the orb is depleted, not sure if this issue is related or not.

Any ideas what could cause such a bug? And what I might do to fix it other than removing or recoding the animations completely?
I'd much rather patch the existing code than have to rewrite it all due to time constraints between work and school.


http://imgur.com/a/d6qFN
Before and after /reload with animations enabled on power bar.

code can be viewed here:
https://github.com/galaxy119/Roth_UI
  Reply With Quote
08-12-16, 12:12 AM   #2
Phanx
No Life!
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,471
Originally Posted by Galaxy119 View Post
Unfortunately, for some reason as of 7.0.3, whenever the UI is reloaded (through /reload or zone change) if the orb displaying an animation is not 100% full, it glitches the UI, turning basically everything transparent (see screenshot) aside from the addon's artwork and the primary actionbar.
If it only happens under those conditions, it should be fairly easy to work around. Set a flag on PLAYER_ENTERING_WORLD. Skip all updates (or just the problematic part of the update) if the flag isn't set. Clear the flag on PLAYER_LEAVING_WORLD. You may need to experiment with additional events (you can use RegisterAllEvents to build a log of all events in the order they occur during reload/zone change) and/or using timers (eg. remove the animation if the flag is unset, then add it back with a timer if PEW is too soon).
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
08-15-16, 12:29 AM   #3
Galaxy119
A Cliff Giant
 
Galaxy119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 78
Originally Posted by Phanx View Post
If it only happens under those conditions, it should be fairly easy to work around. Set a flag on PLAYER_ENTERING_WORLD. Skip all updates (or just the problematic part of the update) if the flag isn't set. Clear the flag on PLAYER_LEAVING_WORLD. You may need to experiment with additional events (you can use RegisterAllEvents to build a log of all events in the order they occur during reload/zone change) and/or using timers (eg. remove the animation if the flag is unset, then add it back with a timer if PEW is too soon).
As far as I can tell, it already waits for PEW to update the orb model (model refers to the animation, the non-animated texture of the orb is just refered to as the statusbar in the code)
Lua Code:
  1. --update model func
  2.     function model:Update()
  3.       local cfg = db.char[self.type].model
  4.       self:SetCamDistanceScale(cfg.camDistanceScale)
  5.       self:SetPosition(0,cfg.pos_x,cfg.pos_y)
  6.       self:SetRotation(cfg.rotation)
  7.       self:SetPortraitZoom(cfg.portraitZoom)
  8.       self:ClearModel()
  9.       --self:SetModel("interface\\buttons\\talktomequestionmark.m2") --in case setdisplayinfo fails
  10.       self:SetDisplayInfo(cfg.displayInfo)
  11.     end
  12.     model.type = orb.type
  13.     model:SetScript("OnEvent", function(self) self:Update() end)
  14.     model:RegisterEvent("PLAYER_ENTERING_WORLD")
  15.     model:SetScript("OnShow", function(self) self:Update() end)
  16.     model:Update()
  17.     orb.model = model

As always you can find the rest of the code here: https://github.com/galaxy119/Roth_UI

Also the orb animations don't update properly, as the orb unfills, the animation is suppose to unfill aswell, however it does not.
  Reply With Quote
08-15-16, 01:31 AM   #4
Galaxy119
A Cliff Giant
 
Galaxy119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 78
It appears something i've done at some point has broken the animation more.
Now it won't unfill from depleted orbs, and the animation does not re-appear upon /reload or zone changes, but does upon login.
  Reply With Quote
09-09-16, 02:38 AM   #5
Healbotadin
A Kobold Labourer
Join Date: Sep 2016
Posts: 1
I know it's been a while, but any updates or fixes for this? I'm now running into the same problem with ouf_Diablo. It is definitely tied to the orb animations since it only really happens if I load or reload while dead (or lacking a large amount of health/mana).
  Reply With Quote
09-13-16, 02:39 AM   #6
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,579
Afaik that issues is fixed. Check http://www.wowinterface.com/download...ysRevival.html
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Addon causing UI elements to turn transparent

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off