View Single Post
09-17-19, 01:03 PM   #1
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
How to get *textured* PlayerModel frame of shapeshift forms?

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:


Last edited by LudiusMaximus : 09-22-19 at 06:53 PM.
  Reply With Quote