I want to put the 3D models of shapeshift forms into a frame, but
SetModel() with the
ModelFileID as returned by
GetModelFileID() only gives me the model without a texture.
How can this be achieved?
Here is my code so far:
Code:
local playerModelFrame = CreateFrame("PlayerModel")
playerModelFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
playerModelFrame:SetBackdrop({ bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/DialogFrame/UI-DialogBox-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
playerModelFrame:SetBackdropColor(0.0, 0.0, 0.0, 1.0)
playerModelFrame:SetWidth(300)
playerModelFrame:SetHeight(600)
-- playerModelFrame:SetModel(926251) -- Shaman Ghost Wolf
playerModelFrame:SetModel(1270180) -- BloodElf male Havoc
playerModelFrame:SetModelScale(1)
And this is the result: