Field of view of current camera
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/03/2009 at 02:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
Hi,I need to obtain the field of view of the current camera inside an XPRESSO-network. At the moment I use a coffee-node to get the current camera using the following code:
>
var activeCam = doc->GetActiveBaseDraw()#BASEDRAW_DATA_CAMERA;But how do I obtain the field of view of that camera? I didn't find anything on that in the SDK (HTML, the winhelp-version seems to be broken, I downloaded it, but all pages seem to miss content). Apparently there are no special classes for different types of objects in COFFEE and I can only use the methods of BaseObject ?! Is there some container ID I missed? Unfortunatly I didn't find a complete list of IDs in the HTML SDK. The BASEDRAW_DATA_CAMERA I only found in an example in the forum, but not in the SDK.
Thanks,
Chris -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/03/2009 at 06:24, xxxxxxxx wrote:
Hi,
I maybe wrong, but you should check the c4d_basedraw.h.
This line could be helpful:
>void GetViewParameter(Vector \*offset, Vector \*scale, Vector \*scale_z); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/03/2009 at 06:33, xxxxxxxx wrote:
You can use the operator direct after getting the active camera:
>
\> var activeCam = doc->GetActiveBaseDraw()#BASEDRAW_DATA_CAMERA; \> var fov = activeCam#CAMERAOBJECT_FOV; \> println(fov);// Radians \> println(Degree(fov));// Degrees \>To find/get the correct type for a parameter, you can drag it from
the Objects AM into for example a script editor window.Cheers
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/03/2009 at 06:50, xxxxxxxx wrote:
Hi,
Lennart, that's exactly what I needed, and the tip with the drag & drop is great!
Thanks Guys,
Chris