把节点归零处理

View Code
/*
Basic_ListCNT is designed to set up a simple list controller set-up on all selected objects.
It creates a list controller on both rotation and position with a zero track and an animation track.
*/
---2011.7.15 盖天解释
---用于做动画的时候
---给有控制器的节点加入控制
---一定是要有控制器 想bip 就是不行的。

(
on isEnabled
return
(selection.count
>=1)

on execute
do
(
if (selection.count >=1) then
(
for foo in $ do with undo label:"Basic_listCNT" on
(
foo.position.controller
= position_list()
foo.position.controller[
2].controller = position_xyz()
listctrl.setname foo.position.controller
1 "Zero"
listctrl.setname foo.position.controller
2 "Animation"

foo.rotation.controller
= rotation_list()
foo.rotation.controller[
2].controller = euler_xyz()
listctrl.setname foo.rotation.controller
1 "Zero"
listctrl.setname foo.rotation.controller
2 "Animation"
)
undo off
---这里不进行回车处理
for foo in $ do
(
foo.position.controller.setactive
2
foo.rotation.controller.setactive
2
)
max create mode
)
else (messagebox "you have nothing selected")
)
)

  

posted on 2011-07-15 09:34  盖天00  阅读(179)  评论(0编辑  收藏  举报

导航