Change Perspective View settings or creating a View camera?

in The Commons
Hi.
I like my camera's Frame Width at 18 because I find the default perspective effect too harsh for my taste.
This is good for created cameras, but of course, they register to undo history, so it's not good for viewing the scene while working.
Is there a way to adjust the perspective view settings OR create a view camera with my preferred settings?
I can create a camera via script using this I found here in the forums:
// Create a new cameravar oCam = new DzBasicCamera( );oCam.setName( "Test Camera" ); // Add the camera to the sceneScene.addNode( oCam );
And I found this in the Documentation Center which seems like what I need:
DzBasicCamera( DzCamera::CameraType type=DzCamera::PERSPECTIVE_CAMERA, Boolean isViewCamera=false )Create a camera of the given type.Parameter(s):type - The type of the camera.isViewCamera - If true, the camera is a view camera - that is, it only exists as a camera for the purpose of viewing the scene, but is not a member of the scene and is non-animatable. If false, the camera is a normal camera that is a member of the scene.Example:// Create a new orthographic camera that looks forward on the Z axis.DzCamera *cam = new DzBasicCamera( DzCamera::FRONT_CAMERA ); // Name the camera and add it to the scenecam->setName( "My Camera" );dzScene->addNode( cam );
But I don't know what to do with it now :P
I would appreciate if someone could help me with this.
Thank you.
Comments
We cannot, as far as I can tell, create new views (as opposed to cameras) despte the docs. I have reported this as a bug.
However, you can get and edit the properties of the Perspective View as you can those of a camera - for example, see the way the post-load proxy scripts link properties http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#post-load_data_items
You can change the default perspective of the perspective view with the zoom and focal length (left click, right click magnifier icon) and daz will keep the setting when you switch views unless you reset the view (up arrow icon). Doesn't save the setting to file though, and can't find anywhere to set them manually, not sure the api gives you access.
You get used to quickly setting more or less perspective with left and right click.
That sounds awesome and I'd love to know more about it. I took a look but I'm not quite getting it, if you could give me a little hint to go in the right direction, I would appreciate it.
In any case, I mixed codes from these two threads and I ended with something that sets a custom Frame Width value for the currently used camera or view in the viewport.
https://www.daz3d.com/forums/discussion/37901/plz-help-how-to-bank-a-camera-in-script
https://www.daz3d.com/forums/discussion/434007/setting-camera-frame-width-from-script
I saw this around somewhere in the forums earlier and it's a nice and quick workaround, but I really like to define it with numbers because I'm that control freak. Thanks!!
Thje documentation has now been updated, apparently the base camera docs were from the SDK which has more options when creating new objects.