khanat-opennel-code/code/nel/tools/3d/plugin_max/scripts/reload_textures.ms
Fabien_HENON 11298004e9 Updating the world_editor_classes.xml file for the guild missions
- Adding new actions for guild missions
- Adding the guild option for some actions
- Adding the nb_guild_members_needed option for the objectives
2011-05-23 16:09:14 +02:00

30 lines
574 B
Text

-- Function to reload bitmaps in a texture
fn reload_material mat =
(
if classof mat == Multimaterial then
(
for submat = 1 to mat.count do
(
reload_material mat[submat]
)
)
else if classof mat == Standard then
(
-- Has a texture ?
if mat.DiffuseMap != undefined then
(
-- Is it a bitmaptex ?
if classof mat.DiffuseMap == bitmapTex then
(
NelReloadTexture mat.DiffuseMap
)
)
)
)
-- For each material in the material editor
for mate in meditMaterials do
(
reload_material mate
forceCompleteRedraw ()
)