检查场景大纲里有非法命名的,比如物体名字含有“.“的,就需要提醒艺术家来改正了。
(
fn checkState stringName= findString stringName "." != undefined
fn gatherIllegalNames =
(
local objectNames = #()
for item in Objects as Array do
(
append objectNames item.name
)
illegalNames = (for obj in objectNames where checkState obj collect getNodeByName obj)
print "@@@"
print illegalNames
local selectedState = querybox ("Scene explorer has " + (illegalNames.count) as string + " illegal node(s), Do you wanna select them? ") title:"Warning"
if selectedState == true then
(
select illegalNames
)
)
try destroyDialog ::checkIllegalNameUI catch()
rollout checkIllegalNameUI "Check Illegal Names"
(
button execute_btn "Check Illegal Names" pos:[12,20] width:140 height:30 align:#left
on execute_btn pressed do ( gatherIllegalNames() )
)
createdialog checkIllegalNameUI 160 70
)