Thread Tools Display Modes
08-07-16, 06:05 AM   #1
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Addon causing UI elements to turn transparent

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.
  Reply With Quote
08-07-16, 06:57 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you want help writing, changing, fixing, debugging, or doing anything else with code, please post the entire, actual code you are working with.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-07-16, 06:58 AM   #3
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
https://github.com/galaxy119/oUF_Diablo
  Reply With Quote
08-07-16, 07:41 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This code in core/panel.lua clearly indicates there are animations:
Code:
  panel.updateHealthOrbGalaxiesAlpha = function()
    if ns.HealthOrb.galaxies then
      local alpha = panel.loadHealthOrbGalaxiesAlpha() or 0
      for i, galaxy in pairs(ns.HealthOrb.galaxies) do
        if galaxy.ag:IsPlaying() and alpha == 0 then
          galaxy.ag:Stop()
        elseif not galaxy.ag:IsPlaying() and alpha > 0 then
          galaxy.ag:Play()
        end
        galaxy:SetAlpha(alpha)
      end
    end
  end
...but they aren't created anywhere in any files in that repository. Where is the code for that?
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-07-16, 08:11 AM   #5
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by Phanx View Post
This code in core/panel.lua clearly indicates there are animations:

...but they aren't created anywhere in any files in that repository. Where is the code for that?
In the panel.lua file the animations are refered to as "model", the galaxy is a second 'model' independent from the main animation model.
Orb animation model creation is handled in the oUF_Diablo/units/player.lua

https://github.com/galaxy119/Diablo-...layer.lua#L270
Lua Code:
  1. --orb model
  2.     local model = CreateFrame("PlayerModel","$parentModel",scrollChild)
  3.     model:SetSize(orb:GetSize())
  4.     model:SetPoint("TOP")
  5.     --model:SetBackdrop(cfg.backdrop)
  6.     model:SetAlpha(orbcfg.model.alpha or 1)
  7.  
  8.     --update model func
  9.     function model:Update()
  10.       local cfg = db.char[self.type].model
  11.       self:SetCamDistanceScale(cfg.camDistanceScale)
  12.       self:SetPosition(0,cfg.pos_x,cfg.pos_y)
  13.       self:SetRotation(cfg.rotation)
  14.       self:SetPortraitZoom(cfg.portraitZoom)
  15.       self:ClearModel()
  16.       --self:SetModel("interface\\buttons\\talktomequestionmark.m2") --in case setdisplayinfo fails
  17.       self:SetDisplayInfo(cfg.displayInfo)
  18.     end
  19.     model.type = orb.type
  20.     model:SetScript("OnEvent", function(self) self:Update() end)
  21.     model:RegisterEvent("PLAYER_ENTERING_WORLD")
  22.     model:SetScript("OnShow", function(self) self:Update() end)
  23.     model:Update()
  24.     orb.model = model
  Reply With Quote
08-07-16, 12:37 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
http://www.wowinterface.com/download...ysRevival.html
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-07-16, 01:38 PM   #7
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
This is literally my version of Roth UI.
Like, literally mine.
Zork handed over permission for me to make my own since he is abandoning it in Legion.

I've fixed all the other issues except for this and the Nameplates.
  Reply With Quote
08-07-16, 03:25 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
My apologies, I didn't notice the name. Only the gigantic, bold note at the top. (Kinda draws the attention away from anything else. )

Also, note my note in your other thread about getting things transferred.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-07-16, 03:34 PM   #9
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by Seerah View Post
My apologies, I didn't notice the name. Only the gigantic, bold note at the top. (Kinda draws the attention away from anything else. )

Also, note my note in your other thread about getting things transferred.
Kinda the point of the note :P ahaha

I'll talk to zork and see if he'd be willing to do that or not. Thanks, I didn't know.
  Reply With Quote
08-07-16, 04:07 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Galaxy119 View Post
In the panel.lua file the animations are refered to as "model", the galaxy is a second 'model' independent from the main animation model. Orb animation model creation is handled in the oUF_Diablo/units/player.lua
But where is ".ag" assigned? If you can access "galaxy.ag" to call :Play() on it, then that "ag" must be assigned somewhere. Even if it's assigned as "nyancatsandbacon.ag" instead of "galaxy.ag" that won't matter -- "ag" would still appear in the code, but it doesn't, and that's the code I want to see.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-07-16, 04:16 PM   #11
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
The galaxies are outdated, and no longer used. I simply haven't gotten around to removing all of the code, and instead commented it out. I DID remove the function creating the galaxy.ag; which is this:
Lua Code:
  1. --create galaxy func
  2.   local createGalaxy = function(frame,type,x,y,size,duration,texture,sublevel)
  3.     local t = frame:CreateTexture(nil, "MEDIUM", nil, sublevel)
  4.     t:SetSize(size,size)
  5.     t:SetPoint("CENTER",x,y)
  6.     t:SetTexture("Interface\\AddOns\\oUF_Diablo\\media\\"..texture)
  7.     t:SetBlendMode("ADD")
  8.     t.ag = t:CreateAnimationGroup()
  9.     t.ag.anim = t.ag:CreateAnimation("Rotation")
  10.     t.ag.anim:SetDegrees(360)
  11.     t.ag.anim:SetDuration(duration)
  12.     t.ag:Play()
  13.     t.ag:SetLooping("REPEAT")
  14.     return t
  15.   end
I removed the galaxy code above because even with animations disabled, the galaxies (not being included in the animations settings) were still causing the bug in question. I removed galaxies, and disabling animations now works to stop the bug, but the animations themselves still cause it.



EDIT: I went through and removed all of the outdated 'galaxies' code.
Enabling orb animations still causes the bug.

Last edited by Joker119 : 08-08-16 at 09:18 PM.
  Reply With Quote
08-08-16, 09:18 PM   #12
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Still looking for help with this -
Updated addon git:
https://github.com/galaxy119/Roth_UI
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Addon causing UI elements to turn transparent


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