I’m trying to get camera data from skp file for my software… All I found on the documentation and this forum are very confusing.
I get the main camera via SUModelGetCamera, but there is no aspectRatio… And I would like to have all the point of view stored into the file.
I tried to get scenes via SUModelGetScenes but I didn’t find cameras.
I saw on this thread that there is data relative to cameras at the root of the model, but I didn’t find how to access them…
So, how could I collect camera data of a sketchup model via the C sdk ?
Thanks by advance,
Regards.
You mean you didn’t find the function?
SUCameraGetAspectRatio
No I found the function but I always get 0.
The problem is that the pov that I’ve got does not fit exactly the Sketchup one (the field seems to be a bit smaller on my software). So I started to think that the fov should be corrected according to the aspect ratio…
SUSceneGetCamera
Is it normal to get a scenes count (with SUModelGetNumScenes), that do not correspond to the scene count I’ve get with SUModelGetScenes ?
That was related to the Advanced Camera Tools extension - is that what you are looking for here?
Hm… I need to look into what the C API return. With the Ruby API this is somewhat undefined. SU use vertical FOV normally. However, once aspect ratio is set it suddenly changes to horizontal. In SU2015 we added the fov_is_height? method to query this. Prior to this one had to make assumptions.
I’m somewhat new to the C API myself so I need to dig into the source for what it does.