Is there a way to extract which viewport is currently active? What I'm trying to do is create a simple (newbie) script to generate nurbs curves. I'd like it to be intuative like the default "Circle" and "Square" commands where they draw out perpendicular to the current viewport selected. Yet, if the Persp or a non-orthographic viewport is selected, it defaults to the top for creation. Any ideas?