Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LUA_FUNCTION( GetMaterials )
- {
- // Materials
- int size = m_pMatSystem->GetNumMaterials();
- int list = m_pMatSystem->FirstMaterial();
- ILuaObject* table = g_Lua->GetNewTable();
- while ( ++list != size )
- {
- IMaterial* used_list = m_pMatSystem->GetMaterial(list);
- table->SetMember(list + 1, used_list);
- }
- g_Lua->Push(table);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment