Author Topic: Get the X Y or Z value form a luxmath.Vector  (Read 1325 times)

0 Members and 1 Guest are viewing this topic.

Offline Archaine

  • Newbie
  • *
  • Posts: 10
Get the X Y or Z value form a luxmath.Vector
« 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)
« Last Edit: December 20, 2016, 07:25:38 am by Archaine »