Get the X Y or Z value form a luxmath.Vector

Started by Archaine, December 19, 2016, 01:55:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Archaine

I am adjusting my camera distance based on the size of the root node, in order to create a zoomed to extents camera for generating product thumbnails.   How do I access the x y or z value in a luxmath.vector?  regular python code does not seem to work on them, FYI - never seen python before last Friday.

OK,  got it to work after hours of pain.

lux.setStandardView(lux.VIEW_FRONT)
box = root.getBoundingBox()
print(box)
b1 = box[1]
b1v = b1.val()
bb=luxmath.Vector(b1v)
print(bb.y)