[Bf-python] Scene Scriptlinks and scale
Campbell Barton
cbarton at metavr.com
Sun Aug 21 19:01:19 CEST 2005
This should realy be added as a note in the documentation about scriptlinks.
Panel size adjusts the modelview matrix, python coders can account for
this in there scene scriptlinks by multiplying the value by the views matrix
viewMatrix = Buffer(GL_FLOAT, 16)
glGetFloatv(GL_MODELVIEW_MATRIX, viewMatrix)
f = 1/viewMatrix[0]
glRasterPos2i(X*f, Y*f)
Campbell Barton wrote:
> Hi All, I just found a problem.
> I have noticed that with openGL + scene, Scriptlinks the scale of
> glRasterPos is multiplied by the size of the Floating panels (ctrl +/-)
>
> This makes it impossible to draw at pixel accurate locations and also
> know where the mouse clicked in relation to the scriptlinks.
>
> - Cam
>
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
More information about the Bf-python
mailing list