C SDK - How to get reference for the camera object(s)?
-
The get and set functions defined in
camera.h
require 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.h
to 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.
Advertisement