Thread Tools Display Modes
07-29-14, 05:26 PM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
rIngameModelViewer

I take the chance of the new addon of reviewing most of my code and thus rewriting most of my addons.

The model viewer comes first most of the time since I need it to check for ingame animations anyway.

Current alpha:
https://code.google.com/p/rothui/sou...odelViewer.lua

__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-31-14, 12:11 PM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Thanks to Resike and Vruul I have now an even better function set for the model viewer that allows model tilting which was not possible before.



It works fine for SetModel(), SetDisplayInfo() and SetUnit().

It may crumble for models that cannot have a custom camera applied. We will see.
__________________
| 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 : 07-31-14 at 12:15 PM.
 
07-31-14, 12:50 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Looking good, if you need help with anything, i'm here.
Specially if you want to display the multi textured models too, i can point you to:

https://github.com/Resike/PowerAuras...ptionsData.lua

How could you get info from models beyong 52.000 ids? I was looking for this model id so badly: 55907.

Last edited by Resike : 07-31-14 at 01:14 PM.
 
08-01-14, 01:44 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Not sure if SetDisplayInfo() uses the same ID as what is the modelId.

In Pandaria the SetDisplayInfo() values reached from 1-48,000. I have not checked how far it goes in WoD yet.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
08-01-14, 02:41 AM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by zork View Post
Not sure if SetDisplayInfo() uses the same ID as what is the modelId.
It does.

Originally Posted by zork View Post
In Pandaria the SetDisplayInfo() values reached from 1-48,000. I have not checked how far it goes in WoD yet.
I tried it on live, and managed to see all models from 1-56,000-ish. Most of them are duplicates ofc, but the new models like the lastly added mounts sit around 56k.
 
08-07-14, 10:22 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Just a head up, in Power Auras i updated the Reset() method like this:

Lua Code:
  1. function model:GetBaseCameraTarget()
  2.     local modelfile = self:GetModel()
  3.     if modelfile and modelfile ~= "" then
  4.         local tempmodel = CreateFrame("PlayerModel", nil, UIParent)
  5.         tempmodel:SetModel(modelfile)
  6.         tempmodel:SetCustomCamera(1)
  7.         local x, y, z = tempmodel:GetCameraTarget()
  8.         tempmodel:ClearModel()
  9.         return x, y, z
  10.     end
  11. end
  12.  
  13. function model:Reset()
  14.     local modelfile = self:GetModel()
  15.     self:ClearModel()
  16.     self:SetModel(modelfile)
  17.     -- With model id
  18.     --self:SetDisplayInfo(modelid)
  19.     self:SetRotation(0)
  20.     self:SetPosition(0, 0, 0)
  21.     self:RefreshCamera()
  22.     self:SetCustomCamera(1)
  23.     if self:HasCustomCamera() then
  24.         local x, y, z = self:GetCameraPosition()
  25.         local tx, ty, tz = self:GetCameraTarget()
  26.         self:SetCameraTarget(0, ty, tz)
  27.         self:SetOrientation(math.sqrt(x * x + y * y + z * z), - math.atan(y / x), - math.atan(z / x))
  28.     end
  29.     --[[self:SetCustomCamera(1)
  30.     self:SetCameraPosition(x, y, z)
  31.     self:SetPosition(px, py, pz)
  32.     self:SetRotation(rot)
  33.     self:SetCameraTarget(0, ty, tz)
  34.     self:SetOrientation(math.sqrt(x * x + y * y + z * z), - math.atan(y / x), - math.atan(z / x))]]
  35. end

This solution was just a temporary hack:

Lua Code:
  1. self:SetCameraTarget(0, 0, pi / 5)

Last edited by Resike : 08-07-14 at 10:26 AM.
 
08-15-14, 02:45 PM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Thanks a ton Resike.

I have a first version up and running.

http://www.wowinterface.com/download...ViewerWoD.html

Not finished yet. Missing the modal view and a create/displayinfo switch.

The seperation between CustomCamera models and those that do not have such a camera is in already.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
10-28-14, 06:11 PM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Quick update, now you can index around ~62.000-ish models.
Found some gems like these:





https://raw.githubusercontent.com/Re...ptionsData.lua

Last edited by Resike : 10-28-14 at 06:16 PM.
 
10-28-14, 08:11 PM   #9
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
WTF? The game has 62k models? oO
 
10-28-14, 09:30 PM   #10
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Yep. NPCs, critters, mailboxes, flags, spell effects, etc.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

 
10-29-14, 12:19 AM   #11
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Duugu View Post
WTF? The game has 62k models? oO
There are a lot of duplicates in this 62k tho.
 
 

WoWInterface » Site Forums » Archived Beta Forums » WoD Beta archived threads » rIngameModelViewer

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