Active_view.camera.get_center2d & .get_scale2d
-
I can read center2d and scale2d of a page camera through C++ SDK.
Is there any chance I could get those values for active_view.camera?
The active camera in C++ SDK is not being updated when SU view is modified (inside SketchUp).If it is not possible, then I kindly request this feature in Ruby API.
Reading camera.field_of_view_is_height would be also good to have. -
Can't you just use:
Sketchup.active_model.active_view.vpwidth
and.vheight
to get the model window's pixel size, then take half of those to get the center point relative to top-left corner of the window ? -
get_center2d() and get_scale2d() C++ SDK functions return a camera shift and zoom-in factor for 2p perspective camera.
You reply gave me idea, that maybe I could calculate the shift/zoom using InputPoint.position... This may work.
Advertisement