I’m working on a exporter using the C API and I wonder if it’s possible to get the camera information of the “viewport” (that’s it the camera being used by the user while moving around and editing the model).
I only found structs and functions for scene cameras, but that’s not really what I wanted.
An exporter from the SketchUp process? …
Or an exporter from another application to write out a SKP file?
Perhaps this is only valid from within the SketchUp application using the C API in “live” mode when you get the model from SUApplicationGetActiveModel() ?
Or maybe, it is NULL when the model has scene pages. I.e., when a model has no scene pages, then perhaps the model itself stores a camera object.
But, there is no need for the model to store a camera, if the model has scenes, because SUModelGetActiveScene will have the edit camera.
So, first check SUModelGetNumScenes() and if 0 then get the model’s camera, if > 0, then get the active scene’s camera.
EDIT: After a night’s rest and a cup of coffee, I remembered that the scene pages can be set to not save camera position, so my musing (above) is not likely true.