EngineGetVisibleTextureNames: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool engineGetVisibleTextureNames ( [ string nameFilter = "*", string modelFilter = "" ] )
bool engineGetVisibleTextureNames ( [ string nameFilter = "*" ] )
</syntaxhighlight>  
</syntaxhighlight>  


===Optional Arguments===  
===Optional Arguments===  
*'''nameFilter:''' Excludes textures from the list that do not match the wildcard string.
*'''nameFilter:''' Only include textures that match the wildcard string.
*'''modelFilter:''' Excludes textures from the list that do not appear in the named model. This can be a model name such as "des_ranch" or a model id number. If not set, all textures are included.


===Returns===
===Returns===

Revision as of 14:13, 22 July 2011

Only available in 1.1 This function returns a list of the world textures which are being used to draw the current scene.

Syntax

bool engineGetVisibleTextureNames ( [ string nameFilter = "*" ] )

Optional Arguments

  • nameFilter: Only include textures that match the wildcard string.

Returns

Returns a table of texture names.

Example

This example will output the names of all the visible textures that start with 'a'

for _,name in ipairs( engineGetVisibleTextureNames ( "a*" ) ) do
    outputConsole( name )
end

See Also