[Bf-python] Setting the viewpoint in python scripts
Willian Padovani Germano
wgermano at ig.com.br
Sun Feb 6 20:18:15 CET 2005
Hi (oi :) ),
Rodrigo Damazio wrote:
> I'm writing a script which would need to obtain the currently
> active 3D view(or detect that the currently active window is not a 3D
> one) and change the position(offset) and rotation(quaternion) of its
> view (not the camera - any view). I'm wondering how I could do that. I
> have found the Window.SetViewQuat() method, but that doesn't set the
> offset, and I don't see a way to get the currently active view.
Maybe checking mouse coordinates against the Window.GetScreen* functions
would be enough for what you want, at least you'd know where the focus
is at the moment, but it all depends on what you'll do (gui script,
script link, unsupported "grab the main loop with QRead()" way - this
last one is considered an unofficial hack or so).
A Window.SetViewOffset method is still missing, yes. I'll see if we can
add it for the next release (you can get it earlier using the cvs
version or some testing build posted at the forum at blender.org). It's
simple, we just need to check if it needs some special care.
--
Willian
More information about the Bf-python
mailing list