测试Maxscript中创建的ListBox 双击清空列表,右键选择全部
rollout AAA "测试双击清空列表" width:162 height:300
(
listbox SSS "list" pos:[24,39] width:108 height:8
button btn12 "Button" pos:[21,201] width:113 height:42
global BB = #()
global BB1 = #()
fn getBB =
(
sel = getCurrentSelection()
for a=1 to sel.count do
(
if sel[a].modifiers[#skin] != undefined then append BB sel[a].name --有skin的物体,将他们的名字加入到BB
if sel[a].modifiers[#skin] != undefined then append BB1 sel[a] --有skin的物体,将他们自身加入到BB1
print BB
)
)
on SSS selected nameIndex do --测试单击列表里的名字
(
select (getNodeByName SSS.items[nameIndex])
)
on SSS doubleClicked nameindex do --测试双击列表里的名字
(
temp = SSS.items
print SSS.items.count