Notifications
Clear all

[Closed] Is it possible to copy a view to an other ?

I would like to memorize a view and paste it in another viewport.
I have tried

m=viewport.getTM()
–clic in another view
viewport.setTM m

but it return ‘false’
Where is the problem ?

that does work only in the same viewport

5 Replies

From the maxscript reference:

The viewport needs to be a non-orthographic viewport.

Perhaps this is the problem?

You might want to copy the viewport type first using viewport.getType() and viewport.setType().

that does work, except the zoom factor is not the same.
It is possible to know the zoom factor by using viewport.GetFOV() but there are no .setFOV function. Does anybody know how to by-pass this problem?

 rdg

Just an idea:
you could convert the view to a camera, set the other view to this camera and convert it back to perspective. This would introduce some irrgularities but in the main it would copy the viewport.

Georg

Yes, that could be a solution.

So nobody know how to set the right zoom?

coping the camera itself will copy the FOV, and switching back to Perspective will NOT change the FOV of the camera it was just in.