Camera - FOV = H unchecked
-
I have found a model that has a camera that somehow has FOV calculated in non standard way.
When investigated deeper usingSketchup.send_action(10624)
I realized that the FOV=H is unchecked, which is not default way SU calculates FOV.
Can we somehow set the checkbox back to default state? Can we read the value(s) from the 'Camera' window?I have fund out that when I manually, in the Ruby Console, set 'active_view.aspect_ratio' to value != 0 and then
Sketchup.active_model.active_view.camera.aspect_ratio=0.0
the Fov = H is being restored to default state.Unfortunately I have hard time doing it from Ruby, even when:
Sketchup.active_model.active_view.camera.aspect_ratio=1.5 Sketchup.active_model.active_view.invalidate Sketchup.active_model.active_view.camera.aspect_ratio=0
-
I noticed the same problem some time ago. There is no way of know if SU calculates the FOV vertically or horizontally.
I think that when you set the aspect ratio to be larger than the viewport aspect ratio it jumps from V to H. But I have no idea if it's actually the case. Nor have I found if one can detect if the toggle is done manually via that debug window.And I was in fact looking at the same problem yesterday - but got no further.
-
I've also been digging around in this arena recently, but I had not noticed that some models could be altered and saved to use horizontal FOV.... That could mess things up.
-
Ruby just nees more methods wrapped. On the C++ SDK's ISkpCamera, you have:
virtual HRESULT STDMETHODCALLTYPE get_FieldOfViewIsHeight(/*[out]*/ BOOL *pVal) = 0;
-
That would be a great request. I know just the people to contact
-
Also throw in a mention of the camera shifting that occur at times when using camera.aspect_ratio...
Advertisement