Hi Jazznazz,
This type of search would be very easy to use Creator’s OpenFlight Scripting to accomplish. Whenever something is needed to be done on a lot of models, scripting is usually the best answer. To show how this could be accomplished, I have written a script to do exactly this. The script below will take a directory as input, and analyze all the flt files in that directory. It outputs all texture files that are referenced in the geometry, but not included on disk. However, please note that what you want may differ slightly from what this script does. for instance, it does not check to see what textures are in the palette and make sure they exist on disk. It also doesn’t check to see what textures are referenced by new materials. So if you have a missing texture in the palette and it is not assigned to a polygon, or if you have a missing texture assigned to an extended material, these missing textures will be missed.
Here is the script. Feel free to edit this to address your needs. Just copy and paste into the OpenFlight Script Editor inside of Creator. (It will only run in Creator due to API Level 4 call to prompt for a folder)
import os, glob
def Prefunc (db, parent, rec, data):
type = mgGetCode(rec)
if (type == fltPolygon):
outs = mgGetAttList (rec, fltPolyTexture, fltLayerTexture1,fltLayerTexture2, fltLayerTexture3, fltLayerTexture4, fltLayerTexture5, fltLayerTexture6, fltLayerTexture7 )
for i in range(1,8):
idx = i*2
name = mgGetTextureName (db, outs[idx])
if ( name ):
if ( not os.path.exists(name) ):
print " --Texture Missing: " + name
return MG_TRUE
status, folder = mgPromptDialogFolder (None, "Select Directory to Process", None)
for filename in glob.glob( os.path.join(folder, '*.flt') ):
db = mgOpenDb (filename)
print " Processing ", filename
mgWalk (db, Prefunc, None, None, MWALK_ON)
mgCloseDb (db)
print "Finished Processing Directory"