Quantcast WoWInterface - View Single Post - Extract model properties
View Single Post
09-24-10, 05:53 PM   #16
A Pyroguard Emberseer
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,680
I like the idea. Would be only possible if a table with all displayIDs for that type is in the background. Otherwise the calculation of the pages would be impossible.

Just checked. I think have an even easier solution. What I did is
    print(displayid..": "..self:GetModel())
Now what's interesting is the string that is returned from getmodel. It contains the complete path to the model used for the skin. The path could be splitted into pieces. My suggestion is to get rid of the navigation depth and just use every single foldername as a tag.

Example for displayid: 17120

This would basically would add sth like this to the savedvariables:

[tags] = {
  [character] = {
    "17210" = true,
  [human] = {
    "17210" = true,
  [female] = {
    "17210" = true,

Sth like that. Later I create a temporary table based on selected tags.

If you would like to generate that list feel free to do so. I will edit the viewer once that is in place. Maybe it's even possible to gather all data, save it to a temp table aswell and when that is done calculate all the tags and save stuff to the savedvariable.

Code for the addon would be sth like this:

for i=1; i<40000 do
local self = mymodel --etc...
self:SetModel("Interface\\Buttons\\talktomequestionmark.mdx") --in case setdisplayinfo fails
--print(id..": "..self:GetModel())
--do stuff
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

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

Last edited by zork : 09-24-10 at 06:45 PM.
  Reply With Quote