Vray Camera position based on Subject fitting into safe frame area?


Hi all,

So I have been digging around for a while on this and so far not been able to find what I’m looking for so…

Is it possible to script a method where we have 2 object pickers (one for a camera and one for a mesh) and 3 radio buttons (one for each axis (X, Y, Z)).

The user would ‘pick’ the camera they want moving > select the axis via radio button that they want to to move along > ‘pick’ the mesh they want fitting into the cameras safe area, and voila… camera moves towards/away from the mesh on the specified axis and fits it to the safe area ready for rendering.

I have not attempted any scripting on this yet as I havn’t found enough information on accessing the safe areas of the camera but I’m fairly sure this would be a small script.

Any advice, links or examples would be great.