Hi pior,
re:
> If I could somehow feed up the coordinates of the 4 corner points (0 0, 0 10, 20 0, 20,10) and instruct
> the renderer to render the content within these corners at a set pixel width/height, that would
> work too.
Well the renderer just renders the view, there isn't any way to tell it to render something different. So you would need to manipulate the view to do what you need.
For a first step if you trigger a Reset on the view, that will center it on the bounding rectangle of the selected objects but leave a little bit of border space around it. Then for an ortho view the size of the viewplane can be set to the size of the geometry to frame it without any border space.
That would go something like this:
script: var objs = moi.geometryDatabase.getSelectedObjects(); var vp = moi.ui.getActiveViewport(); if ( vp.projection == 'Parallel' && objs.length > 0 ) { vp.reset( 'selected' ); var bbox = objs.getHighAccuracyBoundingBox(); vp.fieldOfViewAngle = bbox.yLength; }
I think the on screen display may not show the top and bottom of the objects because they will be running right over the border decorations of the viewport but on a scripted render call the border decorations won't be shown.
- Michael
|