Fandom

WoWWiki

API Model SetModel

104,637pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Widget API ← Model < SetModel

Set the Modelframe to display a certain mesh.


Parameters Edit

  • Path - String
The full path to the meshfile you want to display.

Example Edit

MyModel:SetModel("Character\\NightElf\\Female\\NightElfFemale.mdx");

DetailsEdit

You will find most of the meshes that are shipped with the game inside of model.MPQ. Theoretically you may also load additional meshes provided through AddOns using this function, although there are almost no AddOns out there that make use of this technique at the time.

NotesEdit

Notice that WoW adresses its meshes with a .mdx ending, although they have a .m2 ending in the model.mpq. This is probably due to historical issues that emerged while the game was developed.

A side effect of this function is that it seems to preload the specified mesh into some internal cache. When you're trying to load a mesh that's not shipped with the game, you'll might be forced to call a SetModel() at startup or your mesh won't load at all.

Also on Fandom

Random Wiki