Monday, August 1, 2011

How to move a Spline Knot (Vertex)
Well this is very rough but it will start you off
rollout testme "Testme"
(
button goMe "Go!" width:150
spinner k1 "Knot 1" range:[-100000.0,100000.0,0.0] width:140 align:#center
spinner k2 "Knot2" range:[-100000.0,100000.0,-100.0] width:140 align:#center
fn dLBP pointA pointB =
(
ss = SplineShape pos:pointA
addNewSpline ss
addKnot ss 1 #corner #line PointA
addKnot ss 1 #corner #line PointB
ss.wirecolor = color 255 246 0
updateShape ss
ss
)
on goMe pressed do
(
dLBP  [0.0,0.0,0.0] [0.0,0.0,-100.0]
)
on k1 changed val do
(
setKnotPoint $Shape001 1 1 [0.0, 0.0, val]
updateShape $Shape001
)
on k2 changed val do
(
setKnotPoint $Shape001 1 2 [0.0, 0.0, val]
updateShape $Shape001
)
)
createdialog testme style:#(#style_toolwindow, #style_sysmenu)

No comments:

Post a Comment