- Lua/XML Help
||08-02-18 11:30 AM
Model Frame does not show again after hiding
As the title says, I could make a playermodel frame which shows a spell animation like Weakauras does when logged in. But after I hide it, I can't show it again until reloadui
local function CreateAniFrame(parent, path, size, pos, zxy)
local model = CreateFrame("Playermodel", nil, parent)
model:SetPoint("CENTER", parent, "CENTER", pos, pos)
FYI, it's not a unit portrait or something, it's about spell effect animation. Could anyone give me some clues or some references to fix the issue?
that's an old bug, you have to set model again after hiding
local Redraw = function(self)
if not self.model_path then return end
if type(self.model_path) == "number" then
self:SetPosition(self.ox, self.oy, self.oz)
local ResetTransformations = function(self)
local pmf = CreateFrame("PlayerModel", nil, UIParent )
pmf.model_scale = 1
pmf.ox = 0
pmf.oy = 0
pmf.oz = 0
pmf.model_path = "..."
pmf.Redraw = Redraw
pmf.ResetTransformations = ResetTransformations
||08-02-18 01:40 PM
Think this is easier in terms of resetting the model.
Anyway, I've had this issue too in Immersion
, and noticed that if you're setting model properties while the frame is hidden, they won't take if transitioning from :SetUnit and :SetDisplayInfo to :SetModel. To ensure your solution works, clear the model and set up the properties again after
the model frame is visible, using an OnShow script.
||08-02-18 07:59 PM
Thank you all you guys!!!! I should have asked on this forum earlier. lol
|All times are GMT -6. The time now is 12:31 PM.
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI