MaxScript 扇子打开

rollout fan "扇子" 162 height:212
(
 spinner spn1 "扇叶" pos:[16,16] 131 height:16 range:[0,100,10] type:#integer

 spinner spn2 "每扇叶旋转角度" pos:[16,64] 139 height:16 range:[2.5,100,2.5]

 button btn1 "创建" pos:[24,112] 112 height:19
 button btn3 "删除" pos:[25,154] 113 height:24


 
 on spn1 changed val do
 (
  
  )
 on spn2 changed val do
 (
  
  )
 on btn1 pressed do
 (
   cylinder radius:1 height:3 pos:[0, 0, 0.5]
   
   for i=1 to spn1.value do
   (
    b = "box" + i as string
    b = box length:110 5 height:1 pos:[0, 50, (1+0.05*i)] pivot:[0,0,0]
    animate on
    at time 100
    rotate b (angleaxis (spn2.value * i) [0, 0, -1])
   
   )
  )
 on btn3 pressed  do
  delete objects
)

createdialog fan

原文地址:https://www.cnblogs.com/JimmyCode/p/2252691.html