def brwObjectUalItemSelect( value, dblClick ):
	if dblClick == 0:
		global oi
		if value.find( "/shells" ) == -1 and value[:7] != "shells/":
			oi.setShellMode( 0 )
			ualSelectFilterChange( "All Except Terrain and Shells" )
		else:
			oi.setShellMode( 1 )
			ualSelectFilterChange( "Shells + Contents" )

		oi.setBrowsePath( value )
		oi.showBrowse()
	else:
		if value[-6:] == ".brush":
			WorldEditor.setToolMode( "TerrainTexture" )
			WorldEditor.setCurrentBrush( value )
		elif WorldEditor.isTerrainTexture( value ):
			WorldEditor.setToolMode( "TerrainTexture" )
			WorldEditor.setCurrentTexture( value )
Exemple #2
0
def brwObjectUalItemSelect(value, dblClick):
    if dblClick == 0:
        global oi
        if value.find("/shells") == -1 and value[:7] != "shells/":
            oi.setShellMode(0)
            ualSelectFilterChange("All Except Terrain and Shells")
        else:
            oi.setShellMode(1)
            ualSelectFilterChange("Shells + Contents")

        oi.setBrowsePath(value)
        oi.showBrowse()
    else:
        if value[-6:] == ".brush":
            WorldEditor.setToolMode("TerrainTexture")
            WorldEditor.setCurrentBrush(value)
        elif WorldEditor.isTerrainTexture(value):
            WorldEditor.setToolMode("TerrainTexture")
            WorldEditor.setCurrentTexture(value)