关于 MaxScript 获取所有贴图

相关内容记录在官方文档 BitmapTexture : TextureMap 中

fn allUsedMaps =
(
sceneMaps = usedMaps()
for m in meditmaterials do join sceneMaps (usedMaps m)
sceneMaps
)
allUsedMaps()

 扩展一下复制使用贴图名到指定目录

fn copy_usedmaps maxpath =
(
allusedmaps = makeUniqueArray (usedmaps())  --获取使用贴图并去除重复
for i in allusedmaps do
(
    newfilepath = maxpath + "\" + filenameFromPath i
    if doesFileExist i and not doesfileexist newfilepath do
    (
        copyfile i newfilepath
        )
    )
    ) --收集使用贴图到指定目录,跳过目录内重复贴图
copy_usedmaps "C:UsersAdministratorDesktop"
原文地址:https://www.cnblogs.com/3dxy/p/3988751.html