Maxscript 使用mapped来自动完成循环

这样,无需判断是单个对象还是集合

mapped fn printf obj =
(
	print obj
)
printf 1
printf #(2,3,4)
printf selection

返回:

printf()
1
1
2
3
4
OK
$Teapot:Teapot001 @ [53.158096,11.011307,0.000000]
$Teapot:Teapot003 @ [17.450043,-1.699127,0.000000]
$Teapot:Teapot004 @ [7.082466,-6.706757,0.000000]
$Teapot:Teapot005 @ [1.342255,-9.710831,0.000000]
$Teapot:Teapot002 @ [29.281067,4.314980,0.000000]
OK

Maxscript 使用mapped来自动完成循环

上一篇:acobian矩阵与Hessian矩阵与最小二乘


下一篇:简单组网(VLAN 间通过 VLANIF 接口通信)