KeyShot Forum

Technical discussions => Extending KeyShot => Scripting => Topic started by: Archaine on December 19, 2016, 01:55:05 PM

Title: Get the X Y or Z value form a luxmath.Vector
Post by: Archaine on December 19, 2016, 01:55:05 PM
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)