fn check_mat_ref mat =
(
refs_objs = refs.dependents mat
have_obj = False
if refs_objs != undefined do
(
resultobjs = for obj in refs_objs where superclassof obj == GeometryClass or SuperClassof obj == Shape collect obj
if resultobjs != undefined and resultobjs.count > 0 do have_obj = True
)
have_obj
)
#收集场景中所有有被使用的材质球
fn get_scene_used_mat =(mats = for mat in SceneMaterials where check_mat_ref mat collect mat;mats)
maxscript 检查材质球是否有物体使用
最新推荐文章于 2024-07-15 11:00:00 发布