29 lines
751 B
Plaintext
29 lines
751 B
Plaintext
|
|
set animate off
|
|
a=$Box002
|
|
b=$Box003
|
|
c=$Box004
|
|
--//位置约束
|
|
--a.pos.controller=Position_Constraint()
|
|
--a.pos.controller.appendTarget b 100 --添加Sphere005为约束目标 权重值为100
|
|
--a.pos.controller.relative=on --保持初始偏移
|
|
--a.pos.controller.getweight 4 --获取第四个约束的权重值
|
|
--a.pos.controller.setweight 3 60 --设置第三个约束的权重为60
|
|
--nodename=(a.pos.controller.getnode 1) --获取第1个约束的节点
|
|
--print nodename.name
|
|
--show a.pos.controller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--//旋转约束
|
|
a.rotation.controller=Orientation_Constraint()
|
|
a.rotation.controller.appendTarget b 100
|
|
a.rotation.controller.relative=on
|
|
a.rotation.controller.getweight 2
|
|
a.rotation.controller.setweight 1 60
|
|
nodename=(a.rotation.controller.getnode 1)
|
|
print nodename.name
|
|
show a.pos.controller |