It doesn't work?
Hi,
I created a small scene with boxes as control pounts the name os the boxes are layera1 ... layera17. I did implement you code snippet given earlier and apparently for some reason it couldn't find the object(boxes).
When I printed out controlPointList it gave me only [].
I don't think it is necessary to name object layera1 as 'layera'1 in blender?
I attached the vizard file for anyone who wants to have a go at it. Use Mouse to look around and up/down key to accelerate or moving back.
I will have another go and will try a different approach. I will try to find the unit relation between blender and vizard; eg. 1unit blender = 1unit Vizard, then find all the location manually. Then perhaps, for the control point do something like
cp1 = viz.addControlPoint()
cp1.translate(value x1 * scalingRatio, value y1 * scalingRatio,value z1 * scalingRatio)
cp1.translatemode(viz.LINEAR)
...
cp17 = viz.addControlPoint()
cp17.translate(value x17 * scalingRatio, value y17 * scalingRatio,value z17 * scalingRatio)
cp17.translatemode(viz.LINEAR)
Usually I always scale up my scene 10 times bigger, so by having scalingRatio = 10, it would change the position of the control points as well.
|