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-14-16, 06:09 AM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I installed my model viewer just now. Need to fix some stuff but my murloc is showing fine.

My problem is that self:GetModel() does not work. Seems to be removed.

Uploaded the model viewer for Legion beta.

http://www.wowinterface.com/download...delViewer.html
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-14-16 at 06:24 AM.
 
05-14-16, 11:26 AM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
How can you get the model path then?
 
05-14-16, 11:38 AM   #9
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Resike View Post
How can you get the model path then?
You can't, they aren't using paths internally any more.
 
05-14-16, 02:24 PM   #10
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by semlar View Post
You can't, they aren't using paths internally any more.
It makes no fucken sense. We are forced to build a id-path table for 500k models then?
 
05-14-16, 02:28 PM   #11
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Why you need path?
 
05-15-16, 04:40 AM   #12
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by TOM_RUS View Post
Why you need path?
I don't need the path specifically, i need some id or whatever based on what i can load a saved model. And since not every model have a id for SetDisplayInfo() and SetModel() requires a path, it would makes sense the path would be the best.

It's like removing GetTexture().
 
05-15-16, 05:37 AM   #13
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
I also have some other questions about other model functions. Why do the models look so blurry on the beta? Also what changed with SetLight()? Seems like the parameters did'nt changes however the same code which runs flawlessly on live drops an error in the beta.
 
05-15-16, 05:44 AM   #14
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by Resike View Post
I also have some other questions about other model functions. Why do the models look so blurry on the beta? Also what changed with SetLight()? Seems like the parameters did'nt changes however the same code which runs flawlessly on live drops an error in the beta.
First two arguments are boolean now, instead of 0-1 range.
__________________
 
05-15-16, 06:10 AM   #15
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Originally Posted by Resike View Post
I don't need the path specifically, i need some id or whatever based on what i can load a saved model. And since not every model have a id for SetDisplayInfo() and SetModel() requires a path, it would makes sense the path would be the best.
There's also SetCreature, SetItem, SetItemAppearance, SetDisplayInfo along with SetModel. Those API's cover a broad range of models. Also you don't need any GetXXX API's at all, since that widget only displays whatever you set to it, just store that information yourself somewhere.
 
05-15-16, 08:46 AM   #16
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by TOM_RUS View Post
There's also SetCreature, SetItem, SetItemAppearance, SetDisplayInfo along with SetModel. Those API's cover a broad range of models. Also you don't need any GetXXX API's at all, since that widget only displays whatever you set to it, just store that information yourself somewhere.
The issue is that you won't be able to pair DisplayIDs with their proper model paths like this:

Lua Code:
  1. local function ExtractModelData()
  2.     index = index + 1
  3.     print("Model: ", index)
  4.     model:ClearModel()
  5.     model:SetDisplayInfo(index)
  6.     if model:GetModel() and model:GetModel() ~= "" then
  7.         modelData[index] = model:GetModel()
  8.     end
  9. end

Which kills the ability to categorize/use/select multi textured models.
 
05-18-16, 08:07 AM   #17
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   #18
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   #19
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   #20
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.
 
 

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