How to use Projection Toggle to switch to two point?

currently i use the command shown below to toggle between the projection modes and currently it only toggles between parallel and perspective which is in this manner useful not having to cycle through all three modes, but how would i include the two point? or toggle between two point and perspective?

! _-ViewportProperties _Projection _Toggle _enter

Hello- it looks to me like Toggle is problably left over from before two point perspective existed - it does not really make sense with a third possibility but nevertheless helpful for the two most commonly used projections I suppose.


it is helpful, but almost more do i actually switch between perspective and 2 point when i render stuff out neatly,

so would there be a way to build up a toggle out of maybe 2 commands? how does that generally work with toggle, is that a hardcoded entity or is there anything a regular user can do?

Hello- you can stick this on a button to toggle between persective types:

! _-RunPythonScript (
import Rhino
import scriptcontext as sc 
vp = sc.doc.Views.ActiveView.ActiveViewport
if vp.IsPerspectiveProjection:
    if not vp.IsTwoPointPerspectiveProjection:
        vp.SetProjection(Rhino.Display.DefinedViewportProjection.TwoPointPerspective, vp.Name, False)
        vp.SetProjection(Rhino.Display.DefinedViewportProjection.Perspective, vp.Name, False)