C SDK - How to get reference for the camera object(s)?
-
The get and set functions defined in
camera.hrequire a reference to the camera object (type:SUCameraRef). Any idea how to get this reference from the model file?(I can't find anything in
entities.hto get the camera(s)) -
I camera isn't an entity - so it doesn't belong to entities.
In the Ruby API you get Camera objects from View and Page.
In the C API there is no View object, but you get the view's camera from model:
SUModelGetCamera
http://www.sketchup.com/intl/en/developer/su-api/model_8h.html#a8820108ec3ba3ebf849d249845eeab34...and from scenes (what used to be named Pages a long time ago in SketchUp)
http://www.sketchup.com/intl/en/developer/su-api/scene_8h_source.html -
@tt_su said:
I camera isn't an entity - so it doesn't belong to entities.
In the Ruby API you get Camera objects from View and Page.
In the C API there is no View object, but you get the view's camera from model:
SUModelGetCamera
http://www.sketchup.com/intl/en/developer/su-api/model_8h.html#a8820108ec3ba3ebf849d249845eeab34...and from scenes (what used to be named Pages a long time ago in SketchUp)
http://www.sketchup.com/intl/en/developer/su-api/scene_8h_source.htmlThank you very much Thomthom.
It is great help to me. I was searching the documentation for phrases like "getcamera" in vain. -
The search function in the docs sucks.
Glad it helped. -
Thanks again Thomthom. Maybe there is a function to get a reference to a "Text" object as well??? I was searching the web for hours for it when I came to the conclusion that it was missing from the C SDK.
-
You might just be right. I'll check, but it might very well be missing. The C API doesn't have full feature parity.
-
Thank you for checking it.

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement