[Closed] Macroing a Line
As part of a script i want the user to click a button which creates a custom shape (a car icon) However when i draw the shape and copy the code from the listener the shape is not replicated from the code shown in the listener.
Can someone tell me the syntax for a line eg how i can specify points and so forth.
thanks in advance
– create a new shape
ss = SplineShape()
– add a new spline to the shape
addNewSpline ss
– create some knots
addKnot ss 1 #corner #line [0, 0, 0]
addKnot ss 1 #corner #line [100, 0, 0]
addKnot ss 1 #corner #line [100, 100, 0]
addKnot ss 1 #corner #line [0, 100, 0]
– close the spline (connects last with first knot)
close ss 1
– updates internal cache and vp display
updateShape ss
This is just a basic example on how to draw shapes. See the online reference for more help on the individual statements.
- Martijn