Thread Tools Display Modes
05-13-16, 10:56 AM   #1
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
PlayerModel:SetDisplayInfo

Hello.

I'm testing PlayerModel:SetDisplayInfo and it seems it doesn't show the model any longer if you haven't seen the npc before. Once it's in your cache it does work as expected. Is there any new method to achieve this?

Thanks
 
05-13-16, 11:00 AM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
SetDisplayInfo was added specifically to display models without requiring them to be cached; what code are you using to test this?
 
05-13-16, 11:23 AM   #3
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Originally Posted by semlar View Post
SetDisplayInfo was added specifically to display models without requiring them to be cached; what code are you using to test this?

Hello, I was just playing with the next code:
Code:
myFrame:modelFrame = _G.CreateFrame("PlayerModel", "mxpplayermodel", myFrame)
myFrame.modelFrame:SetHeight(120)
myFrame.modelFrame:SetDisplayInfo(26711)
myFrame.modelFrame:Show()
The ID 26711 belongs to the Time-Lost Proto-Drake.

It didn't work before, but after restarting the game it started working. I've used different IDs and it seems to work only sometimes, perhaps it's a little bit buggy right now?

False alarm though

Last edited by maqjav : 05-13-16 at 11:29 AM.
 
05-13-16, 11:31 AM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
I doubt it's bugged, you probably just aren't displaying your frame correctly. The model needs a height, a width, an anchor, and a visible parent to be shown.

You only have a height listed there, no anchor and we can't tell what condition "myFrame" is in.

If you open your character pane you can just type /run CharacterModelFrame:SetDisplayInfo(26711) to test whether the function is actually functioning.
 
05-13-16, 12:08 PM   #5
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Assuming a copy & paste, your first line has a typo. You have a : where instead you should have a . like your other lines.
 
05-13-16, 06:06 PM   #6
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
It might actually be bugged. I have a PlayerModel frame just for some extra effect, and if I assign the points to match the parent on creation it doesn't seem to show the model frame. Assigning the points in the show script of the parent shows the model, but I'm not entirely sure why this is happening.

Lua Code:
  1. Frame:HookScript("OnShow", function(self)
  2.     self.Model:ClearAllPoints()
  3.     self.Model:SetAllPoints()
  4. end)
__________________
 
05-18-16, 08:07 AM   #7
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Looks from another link that getModel is now GetModelAlpha?
 
05-18-16, 08:13 AM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by ceylina View Post
Looks from another link that getModel is now GetModelAlpha?
Nope, thats the model's alpha.
 
05-18-16, 08:44 AM   #9
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Originally Posted by Resike View Post
Nope, thats the model's alpha.
Got it from this

https://www.diffchecker.com/il1di4ac

playermodel, methods, getmodel is now mapped to getModelAlpha. Doesn't make sense but neither does half the changes they are making.
 
05-18-16, 09:57 AM   #10
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by ceylina View Post
Got it from this

https://www.diffchecker.com/il1di4ac

playermodel, methods, getmodel is now mapped to getModelAlpha. Doesn't make sense but neither does half the changes they are making.
No it's not. Log in on the beta and check the return values it's gonna be a number from 0-1.
 
05-18-16, 10:43 AM   #11
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Originally Posted by Resike View Post
No it's not. Log in on the beta and check the return values it's gonna be a number from 0-1.
well then it no longer exists so like hinted it, it's a dumb change
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » PlayerModel:SetDisplayInfo

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