关于清除丢失贴图与IES文件

时间:2022-04-28 04:25:14
fn YY_clrmessingmaps =
(
YY_messingmap = #()
allBitmaps = getClassInstances BitmapTexture -- 所有材质
for m= to allBitmaps.count do
(
if not doesfileexist allBitmaps[m].filename do append YY_messingmap m
) -- 收集丢失贴图
if YY_messingmap.count != do
for c in YY_messingmap do
(
allBitmaps[c].filename = ""
); -- 清除丢失贴图 YY_messingIES = #()
all_light = getClassInstances Target_Light + getClassInstances Free_Light -- 所有灯光
for l= to all_light.count do
(
if not doesfileexist all_light[l].webFile do append YY_messingIES l
) -- 收集丢失IES
if YY_messingIES.count != do
for w in YY_messingIES do
(
all_light[w].webFile = ""
) -- 清除丢失IES
)-- 清除丢失贴图与IES