WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   WoD Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=151)
-   -   rIngameModelViewer (https://www.wowinterface.com/forums/showthread.php?t=49549)

zork 07-29-14 05:26 PM

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


zork 07-31-14 12:11 PM

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.

Resike 07-31-14 12:50 PM

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.

zork 08-01-14 01:44 AM

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.

Resike 08-01-14 02:41 AM

Quote:

Originally Posted by zork (Post 294587)
Not sure if SetDisplayInfo() uses the same ID as what is the modelId.

It does.

Quote:

Originally Posted by zork (Post 294587)
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.

Resike 08-07-14 10:22 AM

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)

zork 08-15-14 02:45 PM

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.

Resike 10-28-14 06:11 PM

Quick update, now you can index around ~62.000-ish models.
Found some gems like these:





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

Duugu 10-28-14 08:11 PM

WTF? The game has 62k models? oO

Seerah 10-28-14 09:30 PM

Yep. NPCs, critters, mailboxes, flags, spell effects, etc.

Resike 10-29-14 12:19 AM

Quote:

Originally Posted by Duugu (Post 299177)
WTF? The game has 62k models? oO

There are a lot of duplicates in this 62k tho.


All times are GMT -6. The time now is 10:51 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI