小工具整理
This commit is contained in:
+114
@@ -0,0 +1,114 @@
|
||||
--$Sphere001.position=random [0,0,0][100,100,100]
|
||||
--$Sphere001.position.x=random 0 100
|
||||
|
||||
--$Sphere001.transform=random [0,0,0][100,100,100]
|
||||
--$Sphere001.rotation=random [0,0,0][100,100,100]
|
||||
/*
|
||||
format "$Sphere001.transform=%\n" $Sphere001.transform --世界位置,旋转,缩放
|
||||
format "$Sphere001.rotation=%\n" $Sphere001.rotation --世界旋转(四元数)
|
||||
format "$Sphere001.position=%\n" $Sphere001.position --世界位置
|
||||
format "$Sphere001.scale=%\n" $Sphere001.scale --世界缩放
|
||||
format "$Sphere001.pivot=%\n" $Sphere001.pivot --轴点
|
||||
|
||||
|
||||
|
||||
--默认控制器下世界坐标
|
||||
$Sphere003.position.controller.'X 位置' --英文版为 $Sphere003.position.controller.'X Position'
|
||||
$Sphere003.rotation.controller.'X 轴旋转'=0 --英文版为 $Sphere003.rotation.controller.'X Rotation'
|
||||
$Sphere003.scale.x --中英文一致
|
||||
|
||||
|
||||
--旋转四元数 x y z w X、Y、Z构成矢量,W是围绕矢量的旋转角度
|
||||
$Sphere003.rotation = $Sphere001.rotation
|
||||
$Sphere003.rotation.x
|
||||
$Sphere003.rotation.y
|
||||
$Sphere003.rotation.z
|
||||
$Sphere003.rotation.w
|
||||
*/
|
||||
|
||||
|
||||
/*a=point()
|
||||
a.transform=$.transform
|
||||
b=point()
|
||||
b.transform=$.children[1].transform
|
||||
|
||||
a.size=10
|
||||
a.box=true
|
||||
a.cross=false
|
||||
b.size=10
|
||||
b.box=true
|
||||
b.cross=false
|
||||
|
||||
|
||||
$.pos.controller = position_constraint()
|
||||
$.pos.controller.appendtarget a 100
|
||||
|
||||
$.rotation.controller = lookat_constraint()
|
||||
$.rotation.controller.appendtarget b 100
|
||||
$.rotation.controller.lookat_vector_length = 0
|
||||
$.rotation.controller.viewline_length_abs = off
|
||||
|
||||
$.rotation.controller.upnode_world = off --上方向节点设置
|
||||
$.rotation.controller.pickupnode = b
|
||||
|
||||
$.rotation.controller.relative = on --保持初始偏移
|
||||
|
||||
$.children[1].pos.controller = position_constraint()
|
||||
$.children[1].pos.controller.appendtarget b 100
|
||||
|
||||
|
||||
|
||||
$.boneScaleType=#none
|
||||
$.scale.controller = ScaleXYZ()
|
||||
$.scale.controller.X_Scale.controller = float_script()
|
||||
|
||||
|
||||
--骨骼链条生成
|
||||
rollout boneRig "请先选中根骨"
|
||||
(
|
||||
button btn "骨链绑定"
|
||||
|
||||
on btn pressed do (
|
||||
bo = $ --选中的骨骼节点
|
||||
a = point() --已经在骨骼节点处创建的虚拟节点
|
||||
a.size=10
|
||||
a.cross=false
|
||||
a.box=true
|
||||
a.transform = bo.transform
|
||||
|
||||
while bo.children[1]!=null do (
|
||||
bo.pos.controller = position_constraint() --先位置约束到已创建的a
|
||||
bo.pos.controller.appendtarget a 100
|
||||
|
||||
bo.boneScaleType=#none --更正缩放控制
|
||||
bo.scale.controller = ScaleXYZ()
|
||||
bo.scale.controller.X_Scale.controller = float_script()
|
||||
|
||||
a = point() --为子端创建一个新节点
|
||||
a.size=10
|
||||
a.cross=false
|
||||
a.box=true
|
||||
|
||||
a.transform = bo.children[1].transform --对齐到子端
|
||||
|
||||
bo.rotation.controller = lookat_constraint() --骨骼注视约束到子端的a
|
||||
bo.rotation.controller.appendtarget a 100
|
||||
bo.rotation.controller.lookat_vector_length = 0
|
||||
bo.rotation.controller.viewline_length_abs = off
|
||||
|
||||
bo.rotation.controller.upnode_world = off --上方向节点设置
|
||||
bo.rotation.controller.pickupnode = a
|
||||
|
||||
bo.rotation.controller.relative = on --保持初始偏移
|
||||
|
||||
bo = bo.children[1] --递进bo赋值为子骨骼
|
||||
|
||||
)
|
||||
|
||||
bo.pos.controller = position_constraint() --末端子骨骼位置约束
|
||||
bo.pos.controller.appendtarget a 100
|
||||
|
||||
)
|
||||
)
|
||||
createdialog boneRig
|
||||
*/
|
||||
Reference in New Issue
Block a user