Code:
function onLoad()
--[[ print('onLoad!') --]]
snappoints = {}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = {0,45,0},}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = {0,45,0},}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = {0,180,0},}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = {45,0,0},}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = {180,0,0},}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = {0,0,45},}
snappoints[#snappoints+1] = {position = {3,1,3},
rotation = Vector(0,0,180),}
for i,v in next, snappoints do
print(i,' ',v.position,' ', v.rotation)
end
self.setSnapPoints(snappoints)
ret_snappoints = self.getSnapPoints()
for i,v in next, ret_snappoints do
print(i,' ',v.position,' ', v.rotation)
end
--[[ results - all snappoints are identical in both GUI and data
2 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
1 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
5 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
3 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
4 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
6 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
7 Vector: { 3, 1, 3 } Vector: { 0, 0, 0 }
--]]
end