BPython: bug fixes / patches from trackers

(excuse me for not committing earlier)

Patches by Ken Hughes (thanks for all bug fixes!):

1) Setting a scene's MapOld and MapNew values in python does nothing:
bug #2566 submitted by Dominic Agoro-Ombaka (dmao):
https://projects.blender.org/tracker/?func=detail&aid=2566&group_id=9&atid=125
patch #2571:
https://projects.blender.org/tracker/index.php?func=detail&aid=2571&group_id=9&atid=127

2) Calling the file selector after setting the progress bar crashes Blender:
bug #2418 submitted by Alessandro Garosi (brandano):
https://projects.blender.org/tracker/?func=detail&aid=2418&group_id=9&atid=125
patch #2568:
https://projects.blender.org/tracker/index.php?func=detail&aid=2568&group_id=9&atid=127

3) Menus always generate same event when canceled:
bug #2429 submitted by Campbell Barton:
https://projects.blender.org/tracker/?func=detail&aid=2429&group_id=9&atid=125
patch #2579:
https://projects.blender.org/tracker/?func=detail&aid=2579&group_id=9&atid=127

4) Add a vertex to a mesh with groups using a script and then edit that mesh hangs blender:
bug #2211 reported by German Alonso Tamayo (servivo):
https://projects.blender.org/tracker/index.php?func=detail&aid=2211&group_id=9&atid=125
patch #2580
#https://projects.blender.org/tracker/index.php?func=detail&aid=2580&group_id=9&atid=127

About bug #2033, I'm still looking at it, committing a small fix now.

=====

Patches by Campbell Barton (thanks!):

#2482: BGL pydocs fix broken links
https://projects.blender.org/tracker/index.php?func=detail&aid=2482&group_id=9&atid=127

#2426: Large text in Draw.Text and Draw.GetStreingWidth
https://projects.blender.org/tracker/index.php?func=detail&aid=2462&group_id=9&atid=127

#2521: scene.getActiveObject()
https://projects.blender.org/tracker/index.php?func=detail&aid=2521&group_id=9&atid=127

#2523: NMesh.GetNames()
https://projects.blender.org/tracker/index.php?func=detail&aid=2523&group_id=9&atid=127

- docs also updated
This commit is contained in:
Willian Padovani Germano
2005-05-20 05:14:03 +00:00
parent fcadf9cc34
commit 8f080e024f
13 changed files with 312 additions and 186 deletions

View File

@@ -17,10 +17,11 @@ __bpydoc__ = """\
This script creates an script link to change cameras during an animation. This script creates an script link to change cameras during an animation.
The created script link (a Blender Text) is linked to Scene Frame Changed events. The created script link (a Blender Text) is linked to Scene Frame Changed events.
Usage: Usage:
Run the script, then name the camera Object with the number of the frame(s) where you Run the script, then name the camera Object with the number of the frame(s)
want this camera to become active. where you want this camera to become active.
For example:<br> For example:<br>
- a camera called "10" will become active at frame 10.<br> - a camera called "10" will become active at frame 10.<br>
@@ -30,6 +31,8 @@ Notes:<br>
- This script creates another script named camera.py, which is linked to the current scene.<br> - This script creates another script named camera.py, which is linked to the current scene.<br>
- If there is already a text called "camera.py", but it's from an old version or is not recognized, - If there is already a text called "camera.py", but it's from an old version or is not recognized,
you can choose if you want to rename or overwrite it. you can choose if you want to rename or overwrite it.
- Script inspired by Jean-Michel (jms) Soler's:<br>
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_changerdecamera.htm
""" """
@@ -57,7 +60,7 @@ you can choose if you want to rename or overwrite it.
# ***** END GPL LICENCE BLOCK ***** # ***** END GPL LICENCE BLOCK *****
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
#Script in the same idea that this one : #Script inspired of the idea of this one :
#http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_changerdecamera.htm #http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_changerdecamera.htm
# #
#---------------------------------------------- #----------------------------------------------

View File

@@ -25,7 +25,7 @@
* *
* This is a new part of Blender. * This is a new part of Blender.
* *
* Contributor(s): Willian P. Germano, Campbell Barton * Contributor(s): Willian P. Germano, Campbell Barton, Ken Hughes
* *
* ***** END GPL/BL DUAL LICENSE BLOCK ***** * ***** END GPL/BL DUAL LICENSE BLOCK *****
*/ */
@@ -538,10 +538,14 @@ void BPY_spacescript_do_pywin_event( SpaceScript * sc, unsigned short event,
event = 0; event = 0;
if( event == UI_BUT_EVENT ) { if( event == UI_BUT_EVENT ) {
if( menu_hack && val == UI_RETURN_OK ) { /* "false" event? */
if( menu_hack && ( val == 4 ) ) { /* "false" event? */ if ( menu_hack == 2 ) /* was last event UI_RETURN_OUT? */
menu_hack = 0; /* if so, discard it and clear menu_hack */ spacescript_do_pywin_buttons( sc, UI_RETURN_OUT ); /* if so, send */
} else { menu_hack = 0; /* clear menu_hack */
}
else if( val == UI_RETURN_OUT ) /* possible cancel */
menu_hack = 2;
else {
menu_hack = 1; menu_hack = 1;
spacescript_do_pywin_buttons( sc, val ); spacescript_do_pywin_buttons( sc, val );
} }
@@ -1076,13 +1080,15 @@ static PyObject *Method_GetStringWidth( PyObject * self, PyObject * args )
if( !strcmp( font_str, "normal" ) ) if( !strcmp( font_str, "normal" ) )
font = ( &G )->font; font = ( &G )->font;
else if( !strcmp( font_str, "large" ) )
font = BMF_GetFont(BMF_kScreen15);
else if( !strcmp( font_str, "small" ) ) else if( !strcmp( font_str, "small" ) )
font = ( &G )->fonts; font = ( &G )->fonts;
else if( !strcmp( font_str, "tiny" ) ) else if( !strcmp( font_str, "tiny" ) )
font = ( &G )->fontss; font = ( &G )->fontss;
else else
return EXPP_ReturnPyObjError( PyExc_AttributeError, return EXPP_ReturnPyObjError( PyExc_AttributeError,
"\"font\" must be: 'normal' (default), 'small' or 'tiny'." ); "\"font\" must be: 'large', 'normal' (default), 'small' or 'tiny'." );
width = PyInt_FromLong( BMF_GetStringWidth( font, text ) ); width = PyInt_FromLong( BMF_GetStringWidth( font, text ) );
@@ -1105,6 +1111,8 @@ static PyObject *Method_Text( PyObject * self, PyObject * args )
if( !font_str ) if( !font_str )
font = ( &G )->font; font = ( &G )->font;
else if( !strcmp( font_str, "large" ) )
font = BMF_GetFont(BMF_kScreen15);
else if( !strcmp( font_str, "normal" ) ) else if( !strcmp( font_str, "normal" ) )
font = ( &G )->font; font = ( &G )->font;
else if( !strcmp( font_str, "small" ) ) else if( !strcmp( font_str, "small" ) )
@@ -1113,7 +1121,7 @@ static PyObject *Method_Text( PyObject * self, PyObject * args )
font = ( &G )->fontss; font = ( &G )->fontss;
else else
return EXPP_ReturnPyObjError( PyExc_AttributeError, return EXPP_ReturnPyObjError( PyExc_AttributeError,
"\"font\" must be: 'normal' (default), 'small' or 'tiny'." ); "\"font\" must be: 'normal' (default), 'large', 'small' or 'tiny'." );
BMF_DrawString( font, text ); BMF_DrawString( font, text );

View File

@@ -202,6 +202,7 @@ PyTypeObject Lattice_Type = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
BPy_Lattice_methods, /* tp_methods */ BPy_Lattice_methods, /* tp_methods */
0, /* tp_members */ 0, /* tp_members */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}; };
static int Lattice_InLatList( BPy_Lattice * self ); static int Lattice_InLatList( BPy_Lattice * self );
@@ -684,11 +685,11 @@ static PyObject *Lattice_applyDeform( BPy_Lattice * self )
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError, return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
"Lattice must be linked to an object to apply it's deformation!" ) ); "Lattice must be linked to an object to apply it's deformation!" ) );
//deform children /* deform children */
base = FIRSTBASE; base = FIRSTBASE;
while( base ) { while( base ) {
if( ( par = base->object->parent ) ) { if( ( par = base->object->parent ) ) { /* checking if object has a parent, assigning if so */
if( par->type == OB_LATTICE ) { if((par->type == OB_LATTICE) && (self->Lattice == par->data)) {
object_deform( base->object ); object_deform( base->object );
} }
} }

View File

@@ -26,7 +26,7 @@
* This is a new part of Blender, but it borrows all the old NMesh code. * This is a new part of Blender, but it borrows all the old NMesh code.
* *
* Contributor(s): Willian P. Germano, Jordi Rovira i Bonet, Joseph Gilbert, * Contributor(s): Willian P. Germano, Jordi Rovira i Bonet, Joseph Gilbert,
* Bala Gi, Alexander Szakaly, Stephane Soppera, Campbell Barton * Bala Gi, Alexander Szakaly, Stephane Soppera, Campbell Barton, Ken Hughes
* *
* ***** END GPL/BL DUAL LICENSE BLOCK ***** * ***** END GPL/BL DUAL LICENSE BLOCK *****
*/ */
@@ -275,6 +275,10 @@ If name is not specified a new empty mesh is\n\
returned, otherwise Blender returns an existing\n\ returned, otherwise Blender returns an existing\n\
mesh."; mesh.";
static char M_NMesh_GetNames_doc[] = "\
() - Get a list with the names of all available meshes in Blender\n\n\
Any of these names can be passed to NMesh.GetRaw() for the actual mesh data.";
static char M_NMesh_GetRawFromObject_doc[] = static char M_NMesh_GetRawFromObject_doc[] =
"(name) - Get the raw mesh used by a Blender object\n\n\ "(name) - Get the raw mesh used by a Blender object\n\n\
(name) Name of the object to get the mesh from\n\n\ (name) Name of the object to get the mesh from\n\n\
@@ -2140,6 +2144,19 @@ static PyObject *M_NMesh_GetRaw( PyObject * self, PyObject * args )
return new_NMesh( oldmesh ); return new_NMesh( oldmesh );
} }
static PyObject *M_NMesh_GetNames(PyObject *self)
{
PyObject *names = PyList_New(0);
Mesh *me = G.main->mesh.first;
while (me) {
PyList_Append(names, PyString_FromString(me->id.name+2));
me = me->id.next;
}
return names;
}
/* Note: NMesh.GetRawFromObject gets the display list mesh from Blender: /* Note: NMesh.GetRawFromObject gets the display list mesh from Blender:
* the vertices are already transformed / deformed. */ * the vertices are already transformed / deformed. */
static PyObject *M_NMesh_GetRawFromObject( PyObject * self, PyObject * args ) static PyObject *M_NMesh_GetRawFromObject( PyObject * self, PyObject * args )
@@ -2394,6 +2411,8 @@ static int unlink_existingMeshData( Mesh * mesh )
{ {
freedisplist( &mesh->disp ); freedisplist( &mesh->disp );
EXPP_unlink_mesh( mesh ); EXPP_unlink_mesh( mesh );
if( mesh->dvert )
free_dverts( mesh->dvert, mesh->totvert );
if( mesh->mvert ) if( mesh->mvert )
MEM_freeN( mesh->mvert ); MEM_freeN( mesh->mvert );
if( mesh->medge ) { if( mesh->medge ) {
@@ -2876,6 +2895,8 @@ static struct PyMethodDef M_NMesh_methods[] = {
MethodDef( GetRaw ), MethodDef( GetRaw ),
MethodDef( GetRawFromObject ), MethodDef( GetRawFromObject ),
MethodDef( PutRaw ), MethodDef( PutRaw ),
{"GetNames", (PyCFunction)M_NMesh_GetNames, METH_NOARGS,
M_NMesh_GetNames_doc},
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };

View File

@@ -25,7 +25,8 @@
* *
* This is a new part of Blender. * This is a new part of Blender.
* *
* Contributor(s): Willian P. Germano, Jacques Guignot, Joseph Gilbert * Contributor(s): Willian P. Germano, Jacques Guignot, Joseph Gilbert,
* Campbell Barton.
* *
* ***** END GPL/BL DUAL LICENSE BLOCK ***** * ***** END GPL/BL DUAL LICENSE BLOCK *****
*/ */
@@ -102,6 +103,7 @@ static PyObject *Scene_update( BPy_Scene * self, PyObject * args );
static PyObject *Scene_link( BPy_Scene * self, PyObject * args ); static PyObject *Scene_link( BPy_Scene * self, PyObject * args );
static PyObject *Scene_unlink( BPy_Scene * self, PyObject * args ); static PyObject *Scene_unlink( BPy_Scene * self, PyObject * args );
static PyObject *Scene_getChildren( BPy_Scene * self ); static PyObject *Scene_getChildren( BPy_Scene * self );
static PyObject *Scene_getActiveObject(BPy_Scene *self);
static PyObject *Scene_getCurrentCamera( BPy_Scene * self ); static PyObject *Scene_getCurrentCamera( BPy_Scene * self );
static PyObject *Scene_setCurrentCamera( BPy_Scene * self, PyObject * args ); static PyObject *Scene_setCurrentCamera( BPy_Scene * self, PyObject * args );
static PyObject *Scene_getRenderingContext( BPy_Scene * self ); static PyObject *Scene_getRenderingContext( BPy_Scene * self );
@@ -125,9 +127,9 @@ static PyMethodDef BPy_Scene_methods[] = {
{"setName", ( PyCFunction ) Scene_setName, METH_VARARGS, {"setName", ( PyCFunction ) Scene_setName, METH_VARARGS,
"(str) - Change Scene name"}, "(str) - Change Scene name"},
{"getLayers", ( PyCFunction ) Scene_getLayers, METH_NOARGS, {"getLayers", ( PyCFunction ) Scene_getLayers, METH_NOARGS,
"() - Return a list of layers int indices which are set in this Scene "}, "() - Return a list of layers int indices which are set in this scene "},
{"setLayers", ( PyCFunction ) Scene_setLayers, METH_VARARGS, {"setLayers", ( PyCFunction ) Scene_setLayers, METH_VARARGS,
"(layers) - Change layers which are set in this Scene\n" "(layers) - Change layers which are set in this scene\n"
"(layers) - list of integers in the range [1, 20]."}, "(layers) - list of integers in the range [1, 20]."},
{"copy", ( PyCFunction ) Scene_copy, METH_VARARGS, {"copy", ( PyCFunction ) Scene_copy, METH_VARARGS,
"(duplicate_objects = 1) - Return a copy of this scene\n" "(duplicate_objects = 1) - Return a copy of this scene\n"
@@ -145,7 +147,9 @@ static PyMethodDef BPy_Scene_methods[] = {
{"unlink", ( PyCFunction ) Scene_unlink, METH_VARARGS, {"unlink", ( PyCFunction ) Scene_unlink, METH_VARARGS,
"(obj) - Unlink Object obj from this scene"}, "(obj) - Unlink Object obj from this scene"},
{"getChildren", ( PyCFunction ) Scene_getChildren, METH_NOARGS, {"getChildren", ( PyCFunction ) Scene_getChildren, METH_NOARGS,
"() - Return list of all objects linked to scene self"}, "() - Return list of all objects linked to this scene"},
{"getActiveObject", (PyCFunction)Scene_getActiveObject, METH_NOARGS,
"() - Return this scene's active object"},
{"getCurrentCamera", ( PyCFunction ) Scene_getCurrentCamera, {"getCurrentCamera", ( PyCFunction ) Scene_getCurrentCamera,
METH_NOARGS, METH_NOARGS,
"() - Return current active Camera"}, "() - Return current active Camera"},
@@ -839,6 +843,36 @@ static PyObject *Scene_getChildren( BPy_Scene * self )
return pylist; return pylist;
} }
//-----------------------Scene.getActiveObject()------------------------
static PyObject *Scene_getActiveObject(BPy_Scene *self)
{
Scene *scene = self->scene;
PyObject *pyob;
Object *ob;
if (!scene)
return EXPP_ReturnPyObjError(PyExc_RuntimeError,
"Blender Scene was deleted!");
ob = ((scene->basact) ? (scene->basact->object) : 0);
if (ob) {
PyObject *arg = Py_BuildValue("(s)", ob->id.name+2);
pyob = M_Object_Get(Py_None, arg);
Py_DECREF(arg);
if (!pyob)
return EXPP_ReturnPyObjError(PyExc_MemoryError,
"couldn't create new object wrapper!");
return pyob;
}
return EXPP_incr_ret(Py_None); /* no active object */
}
//-----------------------Scene.getCurrentCamera()------------------------ //-----------------------Scene.getCurrentCamera()------------------------
static PyObject *Scene_getCurrentCamera( BPy_Scene * self ) static PyObject *Scene_getCurrentCamera( BPy_Scene * self )
{ {

View File

@@ -25,7 +25,8 @@
* *
* This is a new part of Blender. * This is a new part of Blender.
* *
* Contributor(s): Willian P. Germano, Tom Musgrove, Michael Reimpell, Yann Vernier * Contributor(s): Willian P. Germano, Tom Musgrove, Michael Reimpell,
* Yann Vernier, Ken Hughes
* *
* ***** END GPL/BL DUAL LICENSE BLOCK ***** * ***** END GPL/BL DUAL LICENSE BLOCK *****
*/ */
@@ -601,6 +602,7 @@ static PyObject *M_Window_DrawProgressBar( PyObject * self, PyObject * args )
float done; float done;
char *info = NULL; char *info = NULL;
int retval = 0; int retval = 0;
ScrArea *sa = curarea;
if (G.background) if (G.background)
return EXPP_ReturnPyObjError(PyExc_RuntimeError, return EXPP_ReturnPyObjError(PyExc_RuntimeError,
@@ -613,6 +615,8 @@ static PyObject *M_Window_DrawProgressBar( PyObject * self, PyObject * args )
if( !G.background ) if( !G.background )
retval = progress_bar( done, info ); retval = progress_bar( done, info );
curarea = sa;
return Py_BuildValue( "i", retval ); return Py_BuildValue( "i", retval );
} }

View File

@@ -39,6 +39,7 @@ The Blender Python API Reference
- L{Sound} - L{Sound}
- L{Text} - L{Text}
- L{Text3d} (new) - L{Text3d} (new)
- L{Font} (new)
- L{Texture} - L{Texture}
- L{Types} - L{Types}
- L{Window} - L{Window}
@@ -105,13 +106,16 @@ Interaction with users:
Scripts can: Scripts can:
- simply run and exit; - simply run and exit;
- grab the main input event queue and process (or pass to Blender) selected
keyboard, mouse, redraw events;
- pop messages, menus and small number and text input boxes; - pop messages, menus and small number and text input boxes;
- draw graphical user interfaces (guis) with OpenGL calls and native - draw graphical user interfaces (guis) with OpenGL calls and native
program buttons, which stay there accepting user input like any other program buttons, which stay there accepting user input like any other
Blender window until the user closes them; Blender window until the user closes them;
- attach themselves to a space's event or drawing code (aka space handlers,
L{check here<API_related>});
- make changes to the 3D View (set visible layer(s), view point, etc); - make changes to the 3D View (set visible layer(s), view point, etc);
- grab the main input event queue and process (or pass to Blender) selected
keyboard, mouse, redraw events -- not considered good practice, but still
available for private use;
- tell Blender to execute other scripts (see L{Blender.Run}()); - tell Blender to execute other scripts (see L{Blender.Run}());
- use external Python libraries, if available. - use external Python libraries, if available.
@@ -206,8 +210,8 @@ A note to newbie script writers:
to get an idea of what can be done, you may be surprised. to get an idea of what can be done, you may be surprised.
@author: The Blender Python Team @author: The Blender Python Team
@requires: Blender 2.36 cvs or newer. @requires: Blender 2.37 or newer.
@version: 2.36 cvs @version: 2.37
@see: U{www.blender3d.org<http://www.blender3d.org>}: main site @see: U{www.blender3d.org<http://www.blender3d.org>}: main site
@see: U{www.blender.org<http://www.blender.org>}: documentation and forum @see: U{www.blender.org<http://www.blender.org>}: documentation and forum
@see: U{www.elysiun.com<http://www.elysiun.com>}: user forum @see: U{www.elysiun.com<http://www.elysiun.com>}: user forum

View File

@@ -121,12 +121,12 @@ Introduction:
Object script links: Object script links:
-------------------- --------------------
Users can link Blender Text scripts to some kinds of objects to have the script Users can link Blender Text scripts and objects to have the script
code executed when specific events occur. For example, if a Camera has an code executed when specific events occur to the objects. For example, if a
script link set to "FrameChanged", the script will be executed whenever the Camera has an script link set to "FrameChanged", the script will be executed
current frame is changed. Links can either be manually added by users on the whenever the current frame is changed. Links can either be manually added by
Buttons window -> Scripts tab or created by another script (see, for example, users on the Buttons window -> Scripts tab or created by another script (see,
L{Object.addScriptLink<Object.Object.addScriptLink>}). for example, L{Object.addScriptLink<Object.Object.addScriptLink>}).
These are the types which can be linked to scripts: These are the types which can be linked to scripts:
- Camera Data; - Camera Data;
@@ -153,38 +153,50 @@ Introduction:
- B{event}: the event type, if the running script is being executed as a - B{event}: the event type, if the running script is being executed as a
script link. script link.
Example::
#script link
import Blender
if Blender.bylink: # we're running as a script link
print "Event: %s for %s" % (Blender.event, Blender.link)
B{Important note about "Render" events}: B{Important note about "Render" events}:
Each "Render" script link is executed twice: before rendering and after, for Each "Render" script link is executed twice: before rendering and after, for
reverting changes and for possible clean up actions. Before rendering, reverting changes and for possible clean up actions. Before rendering,
'Blender.event' will be "Render" and after rendering it will be "PostRender". 'Blender.event' will be "Render" and after rendering it will be "PostRender".
This is specially useful for script links that need to generate data only Example::
useful while rendering, or in case they need to switch between two mesh data # render script link
objects, one meant for realtime display and the other, more detailed, for
renders. This pseudo-code is an example of how such scripts could be written::
import Blender import Blender
event = Blender.event
if Blender.event == "Render": if event == "Render":
# prepare for rendering # prepare for rendering
create_my_very_detailed_mesh_data()
elif event == "PostRender":
# done rendering, clean up
delete_my_very_detailed_mesh_data()
elif Blender.event == "PostRender": As suggested by the example above, this is specially useful for script links
# revert changes / clean up for realtime display that need to generate data only useful while rendering, or in case they need
to switch between two mesh data objects, one meant for realtime display and
the other, more detailed, for renders.
Space Handler script links: Space Handler script links:
--------------------------- ---------------------------
This is a new kind of script linked to spaces in a given window. Right now This is a new kind of script linked to spaces in a given window. Right now
only the 3D View has the necessary hooks, but the plan is to add access to only the 3D View has the necessary hooks, but the plan is to add access to
other types, too. Just to clarify: in Blender, a screen is partitioned in other types, too. Just to clarify naming conventions: in Blender, a screen
windows and each window can show any space. Spaces are: 3D View, Text Editor, is partitioned in windows (also called areas) and each window can show any
Scripts, Buttons, User Preferences, Oops, etc. space. Spaces are: 3D View, Text Editor, Scripts, Buttons, User Preferences,
Oops, etc.
Space handlers are texts in the Text Editor, like other script links, but they Space handlers are texts in the Text Editor, like other script links, but they
need to have a special header to be recognized -- B{I{the first line in the need to have a special header to be recognized -- B{I{the first line in the
text file}} must inform 1) that they are space handlers; 2) the space they text file}} must inform:
belong to; 3) whether they are EVENT or DRAW handlers. 1. that they are space handlers;
2. the space they belong to;
3. whether they are EVENT or DRAW handlers.
Example header for a 3D View EVENT handler:: Example header for a 3D View EVENT handler::
@@ -194,6 +206,9 @@ Introduction:
# SPACEHANDLER.VIEW3D.DRAW # SPACEHANDLER.VIEW3D.DRAW
Available space handlers can be toggled "on" or "off" in the space header's
B{View->Space Handler Scripts} submenu, by the user.
EVENT space handler scripts are called by that space's event handling callback EVENT space handler scripts are called by that space's event handling callback
in Blender. The script receives the event B{before} it is further processed in Blender. The script receives the event B{before} it is further processed
by the program. An EVENT handler script should check Blender.event (compare by the program. An EVENT handler script should check Blender.event (compare
@@ -237,15 +252,19 @@ Introduction:
to be processed or ignored. to be processed or ignored.
- DRAW handlers: 0 always. - DRAW handlers: 0 always.
B{Guidelines}: B{Guidelines (important)}:
- EVENT handlers can access and change Blender objects just like any other - EVENT handlers can access and change Blender objects just like any other
script, but they should not draw (images, polygons, etc.) to the screen, script, but they should not draw (images, polygons, etc.) to the screen,
use a DRAW handler to do that and if both scripts need to pass information B{use a DRAW handler to do that} and, if both scripts need to pass
to each other, use the L{Registry} module. information to each other, use the L{Registry} module.
- DRAW handlers should leave the space in the same state it was before they - DRAW handlers should leave the space in the same state it was before they
executed. OpenGL attributes are automatically saved (pushed) before a DRAW executed. OpenGL attributes and the modelview and projection matrices are
handler runs and restored (poped) after it finishes, no need to worry about automatically saved (pushed) before a DRAW handler runs and restored (poped)
that. after it finishes, no need to worry about that. Draw handlers should not
grab events;
- in short: use the event handler to deal with events and the draw handler to
draw and your script will be following the recommended practices for
Blender code.
Registering scripts: Registering scripts:
==================== ====================

View File

@@ -84,7 +84,7 @@ Example::
def glAccum(op, value): def glAccum(op, value):
""" """
Operate on the accumulation buffer Operate on the accumulation buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/accum.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/accum.html}
@type op: Enumerated constant @type op: Enumerated constant
@param op: The accumulation buffer operation. @param op: The accumulation buffer operation.
@@ -95,7 +95,7 @@ def glAccum(op, value):
def glAlphaFunc(func, ref): def glAlphaFunc(func, ref):
""" """
Specify the alpha test function Specify the alpha test function
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/alphafunc.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/alphafunc.html}
@type func: Enumerated constant @type func: Enumerated constant
@param func: Specifies the alpha comparison function. @param func: Specifies the alpha comparison function.
@@ -107,7 +107,7 @@ def glAlphaFunc(func, ref):
def glAreTexturesResident(n, textures, residences): def glAreTexturesResident(n, textures, residences):
""" """
Determine if textures are loaded in texture memory Determine if textures are loaded in texture memory
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/aretexturesresident.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/aretexturesresident.html}
@type n: int @type n: int
@param n: Specifies the number of textures to be queried. @param n: Specifies the number of textures to be queried.
@@ -121,7 +121,7 @@ def glAreTexturesResident(n, textures, residences):
def glBegin(mode): def glBegin(mode):
""" """
Delimit the vertices of a primitive or a group of like primatives Delimit the vertices of a primitive or a group of like primatives
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/begin.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies the primitive that will be create from vertices between glBegin and @param mode: Specifies the primitive that will be create from vertices between glBegin and
@@ -131,7 +131,7 @@ def glBegin(mode):
def glBindTexture(target, texture): def glBindTexture(target, texture):
""" """
Bind a named texture to a textureing target Bind a named texture to a textureing target
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/bindtexture.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bindtexture.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the target to which the texture is bound. @param target: Specifies the target to which the texture is bound.
@@ -142,7 +142,7 @@ def glBindTexture(target, texture):
def glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap): def glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap):
""" """
Draw a bitmap Draw a bitmap
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/bitmap.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bitmap.html}
@type width, height: int @type width, height: int
@param width, height: Specify the pixel width and height of the bitmap image. @param width, height: Specify the pixel width and height of the bitmap image.
@@ -159,7 +159,7 @@ def glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap):
def glBlendFunc(sfactor, dfactor): def glBlendFunc(sfactor, dfactor):
""" """
Specify pixel arithmetic Specify pixel arithmetic
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/blendfunc.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/blendfunc.html}
@type sfactor: Enumerated constant @type sfactor: Enumerated constant
@param sfactor: Specifies how the red, green, blue, and alpha source blending factors are @param sfactor: Specifies how the red, green, blue, and alpha source blending factors are
@@ -172,7 +172,7 @@ def glBlendFunc(sfactor, dfactor):
def glCallList(list): def glCallList(list):
""" """
Execute a display list Execute a display list
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/calllist.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllist.html}
@type list: unsigned int @type list: unsigned int
@param list: Specifies the integer name of the display list to be executed. @param list: Specifies the integer name of the display list to be executed.
@@ -181,7 +181,7 @@ def glCallList(list):
def glCallLists(n, type, lists): def glCallLists(n, type, lists):
""" """
Execute a list of display lists Execute a list of display lists
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/calllists.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllists.html}
@type n: int @type n: int
@param n: Specifies the number of display lists to be executed. @param n: Specifies the number of display lists to be executed.
@@ -196,7 +196,7 @@ def glCallLists(n, type, lists):
def glClear(mask): def glClear(mask):
""" """
Clear buffers to preset values Clear buffers to preset values
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/clear.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clear.html}
@type mask: Enumerated constant(s) @type mask: Enumerated constant(s)
@param mask: Bitwise OR of masks that indicate the buffers to be cleared. @param mask: Bitwise OR of masks that indicate the buffers to be cleared.
@@ -205,7 +205,7 @@ def glClear(mask):
def glClearAccum(red, green, blue, alpha): def glClearAccum(red, green, blue, alpha):
""" """
Specify clear values for the accumulation buffer Specify clear values for the accumulation buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/clearaccum.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearaccum.html}
@type red,green,blue,alpha: float @type red,green,blue,alpha: float
@param red,green,blue,alpha: Specify the red, green, blue, and alpha values used when the @param red,green,blue,alpha: Specify the red, green, blue, and alpha values used when the
@@ -215,7 +215,7 @@ def glClearAccum(red, green, blue, alpha):
def glClearColor(red, green, blue, alpha): def glClearColor(red, green, blue, alpha):
""" """
Specify clear values for the color buffers Specify clear values for the color buffers
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/clearcolor.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearcolor.html}
@type red,green,blue,alpha: float @type red,green,blue,alpha: float
@param red,green,blue,alpha: Specify the red, green, blue, and alpha values used when the @param red,green,blue,alpha: Specify the red, green, blue, and alpha values used when the
@@ -225,7 +225,7 @@ def glClearColor(red, green, blue, alpha):
def glClearDepth(depth): def glClearDepth(depth):
""" """
Specify the clear value for the depth buffer Specify the clear value for the depth buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/cleardepth.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cleardepth.html}
@type depth: int @type depth: int
@param depth: Specifies the depth value used when the depth buffer is cleared. @param depth: Specifies the depth value used when the depth buffer is cleared.
@@ -235,7 +235,7 @@ def glClearDepth(depth):
def glClearIndex(c): def glClearIndex(c):
""" """
Specify the clear value for the color index buffers Specify the clear value for the color index buffers
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/clearindex.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearindex.html}
@type c: float @type c: float
@param c: Specifies the index used when the color index buffers are cleared. @param c: Specifies the index used when the color index buffers are cleared.
@@ -245,7 +245,7 @@ def glClearIndex(c):
def glClearStencil(s): def glClearStencil(s):
""" """
Specify the clear value for the stencil buffer Specify the clear value for the stencil buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/clearstencil.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearstencil.html}
@type s: int @type s: int
@param s: Specifies the index used when the stencil buffer is cleared. The initial value is 0. @param s: Specifies the index used when the stencil buffer is cleared. The initial value is 0.
@@ -254,7 +254,7 @@ def glClearStencil(s):
def glClipPlane (plane, equation): def glClipPlane (plane, equation):
""" """
Specify a plane against which all geometery is clipped Specify a plane against which all geometery is clipped
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/clipplane.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clipplane.html}
@type plane: Enumerated constant @type plane: Enumerated constant
@param plane: Specifies which clipping plane is being positioned. @param plane: Specifies which clipping plane is being positioned.
@@ -272,7 +272,7 @@ def glColor (red, green, blue, alpha):
glColor4uiv, glColor4usv} glColor4uiv, glColor4usv}
Set a new color. Set a new color.
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/color.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/color.html}
@type red,green,blue,alpha: Depends on function prototype. @type red,green,blue,alpha: Depends on function prototype.
@param red,green,blue: Specify new red, green, and blue values for the current color. @param red,green,blue: Specify new red, green, and blue values for the current color.
@@ -283,7 +283,7 @@ def glColor (red, green, blue, alpha):
def glColorMask(red, green, blue, alpha): def glColorMask(red, green, blue, alpha):
""" """
Enable and disable writing of frame buffer color components Enable and disable writing of frame buffer color components
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/colormask.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormask.html}
@type red,green,blue,alpha: int (boolean) @type red,green,blue,alpha: int (boolean)
@param red,green,blue,alpha: Specify whether red, green, blue, and alpha can or cannot be @param red,green,blue,alpha: Specify whether red, green, blue, and alpha can or cannot be
@@ -294,7 +294,7 @@ def glColorMask(red, green, blue, alpha):
def glColorMaterial(face, mode): def glColorMaterial(face, mode):
""" """
Cause a material color to track the current color Cause a material color to track the current color
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/colormaterial.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormaterial.html}
@type face: Enumerated constant @type face: Enumerated constant
@param face: Specifies whether front, back, or both front and back material parameters should @param face: Specifies whether front, back, or both front and back material parameters should
@@ -306,7 +306,7 @@ def glColorMaterial(face, mode):
def glCopyPixels(x, y, width, height, type): def glCopyPixels(x, y, width, height, type):
""" """
Copy pixels in the frame buffer Copy pixels in the frame buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/copypixels.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html}
@type x,y: int @type x,y: int
@param x,y: Specify the window coordinates of the lower left corner of the rectangular @param x,y: Specify the window coordinates of the lower left corner of the rectangular
@@ -321,7 +321,7 @@ def glCopyPixels(x, y, width, height, type):
def glCullFace(mode): def glCullFace(mode):
""" """
Specify whether front- or back-facing facets can be culled Specify whether front- or back-facing facets can be culled
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/cullface.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cullface.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies whether front- or back-facing facets are candidates for culling. @param mode: Specifies whether front- or back-facing facets are candidates for culling.
@@ -330,7 +330,7 @@ def glCullFace(mode):
def glDeleteLists(list, range): def glDeleteLists(list, range):
""" """
Delete a contiguous group of display lists Delete a contiguous group of display lists
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/deletelists.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletelists.html}
@type list: unsigned int @type list: unsigned int
@param list: Specifiex the integer name of the first display list to delete @param list: Specifiex the integer name of the first display list to delete
@@ -341,7 +341,7 @@ def glDeleteLists(list, range):
def glDeleteTextures(n, textures): def glDeleteTextures(n, textures):
""" """
Delete named textures Delete named textures
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/deletetextures.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletetextures.html}
@type n: int @type n: int
@param n: Specifes the number of textures to be deleted @param n: Specifes the number of textures to be deleted
@@ -352,7 +352,7 @@ def glDeleteTextures(n, textures):
def glDepthFunc(func): def glDepthFunc(func):
""" """
Specify the value used for depth buffer comparisons Specify the value used for depth buffer comparisons
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/depthfunc.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthfunc.html}
@type func: Enumerated constant @type func: Enumerated constant
@param func: Specifies the depth comparison function. @param func: Specifies the depth comparison function.
@@ -361,7 +361,7 @@ def glDepthFunc(func):
def glDepthMask(flag): def glDepthMask(flag):
""" """
Enable or disable writing into the depth buffer Enable or disable writing into the depth buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/depthmask.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthmask.html}
@type flag: int (boolean) @type flag: int (boolean)
@param flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE, @param flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
@@ -372,7 +372,7 @@ def glDepthMask(flag):
def glDepthRange(zNear, zFar): def glDepthRange(zNear, zFar):
""" """
Specify mapping of depth values from normalized device coordinates to window coordinates Specify mapping of depth values from normalized device coordinates to window coordinates
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/depthrange.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthrange.html}
@type zNear: int @type zNear: int
@param zNear: Specifies the mapping of the near clipping plane to window coordinates. @param zNear: Specifies the mapping of the near clipping plane to window coordinates.
@@ -385,7 +385,7 @@ def glDepthRange(zNear, zFar):
def glDisable(cap): def glDisable(cap):
""" """
Disable server-side GL capabilities Disable server-side GL capabilities
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/enable.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html}
@type cap: Enumerated constant @type cap: Enumerated constant
@param cap: Specifies a symbolic constant indicating a GL capability. @param cap: Specifies a symbolic constant indicating a GL capability.
@@ -394,7 +394,7 @@ def glDisable(cap):
def glDrawBuffer(mode): def glDrawBuffer(mode):
""" """
Specify which color buffers are to be drawn into Specify which color buffers are to be drawn into
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/drawbuffer.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawbuffer.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies up to four color buffers to be drawn into. @param mode: Specifies up to four color buffers to be drawn into.
@@ -403,7 +403,7 @@ def glDrawBuffer(mode):
def glDrawPixels(width, height, format, type, pixels): def glDrawPixels(width, height, format, type, pixels):
""" """
Write a block of pixels to the frame buffer Write a block of pixels to the frame buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/drawpixels.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html}
@type width, height: int @type width, height: int
@param width, height: Specify the dimensions of the pixel rectangle to be @param width, height: Specify the dimensions of the pixel rectangle to be
@@ -421,7 +421,7 @@ def glEdgeFlag (flag):
B{glEdgeFlag, glEdgeFlagv} B{glEdgeFlag, glEdgeFlagv}
Flag edges as either boundary or nonboundary Flag edges as either boundary or nonboundary
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/edgeflag.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/edgeflag.html}
@type flag: Depends of function prototype @type flag: Depends of function prototype
@param flag: Specifies the current edge flag value.The initial value is GL_TRUE. @param flag: Specifies the current edge flag value.The initial value is GL_TRUE.
@@ -430,7 +430,7 @@ def glEdgeFlag (flag):
def glEnable(cap): def glEnable(cap):
""" """
Enable server-side GL capabilities Enable server-side GL capabilities
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/enable.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html}
@type cap: Enumerated constant @type cap: Enumerated constant
@param cap: Specifies a symbolic constant indicating a GL capability. @param cap: Specifies a symbolic constant indicating a GL capability.
@@ -439,13 +439,13 @@ def glEnable(cap):
def glEnd(): def glEnd():
""" """
Delimit the vertices of a primitive or group of like primitives Delimit the vertices of a primitive or group of like primitives
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/begin.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html}
""" """
def glEndList(): def glEndList():
""" """
Create or replace a display list Create or replace a display list
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/newlist.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html}
""" """
def glEvalCoord (u,v): def glEvalCoord (u,v):
@@ -454,7 +454,7 @@ def glEvalCoord (u,v):
glEvalCoord2dv, glEvalCoord2fv} glEvalCoord2dv, glEvalCoord2fv}
Evaluate enabled one- and two-dimensional maps Evaluate enabled one- and two-dimensional maps
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/evalcoord.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalcoord.html}
@type u: Depends on function prototype. @type u: Depends on function prototype.
@param u: Specifies a value that is the domain coordinate u to the basis function defined @param u: Specifies a value that is the domain coordinate u to the basis function defined
@@ -471,7 +471,7 @@ def glEvalMesh (mode, i1, i2):
B{glEvalMesh1 or glEvalMesh2} B{glEvalMesh1 or glEvalMesh2}
Compute a one- or two-dimensional grid of points or lines Compute a one- or two-dimensional grid of points or lines
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/evalmesh.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalmesh.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: In glEvalMesh1, specifies whether to compute a one-dimensional @param mode: In glEvalMesh1, specifies whether to compute a one-dimensional
@@ -485,7 +485,7 @@ def glEvalPoint (i, j):
B{glEvalPoint1 and glEvalPoint2} B{glEvalPoint1 and glEvalPoint2}
Generate and evaluate a single point in a mesh Generate and evaluate a single point in a mesh
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/evalpoint.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalpoint.html}
@type i: int @type i: int
@param i: Specifies the integer value for grid domain variable i. @param i: Specifies the integer value for grid domain variable i.
@@ -496,7 +496,7 @@ def glEvalPoint (i, j):
def glFeedbackBuffer (size, type, buffer): def glFeedbackBuffer (size, type, buffer):
""" """
Controls feedback mode Controls feedback mode
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html}
@type size: int @type size: int
@param size:Specifies the maximum number of values that can be written into buffer. @param size:Specifies the maximum number of values that can be written into buffer.
@@ -510,13 +510,13 @@ def glFeedbackBuffer (size, type, buffer):
def glFinish(): def glFinish():
""" """
Block until all GL execution is complete Block until all GL execution is complete
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/finish.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/finish.html}
""" """
def glFlush(): def glFlush():
""" """
Force Execution of GL commands in finite time Force Execution of GL commands in finite time
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/flush.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/flush.html}
""" """
def glFog (pname, param): def glFog (pname, param):
@@ -524,7 +524,7 @@ def glFog (pname, param):
B{glFogf, glFogi, glFogfv, glFogiv} B{glFogf, glFogi, glFogfv, glFogiv}
Specify fog parameters Specify fog parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/fog.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/fog.html}
@type pname: Enumerated constant @type pname: Enumerated constant
@param pname: Specifies a single-valued fog parameter. If the function prototype @param pname: Specifies a single-valued fog parameter. If the function prototype
@@ -538,7 +538,7 @@ def glFog (pname, param):
def glFrontFace(mode): def glFrontFace(mode):
""" """
Define front- and back-facing polygons Define front- and back-facing polygons
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/frontface.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frontface.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies the orientation of front-facing polygons. @param mode: Specifies the orientation of front-facing polygons.
@@ -547,7 +547,7 @@ def glFrontFace(mode):
def glFrustum(left, right, bottom, top, zNear, zFar): def glFrustum(left, right, bottom, top, zNear, zFar):
""" """
Multiply the current matrix by a perspective matrix Multiply the current matrix by a perspective matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/frustum.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frustum.html}
@type left, right: double (float) @type left, right: double (float)
@param left, right: Specify the coordinates for the left and right vertical @param left, right: Specify the coordinates for the left and right vertical
@@ -563,7 +563,7 @@ def glFrustum(left, right, bottom, top, zNear, zFar):
def glGenLists(range): def glGenLists(range):
""" """
Generate a contiguous set of empty display lists Generate a contiguous set of empty display lists
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/genlists.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/genlists.html}
@type range: int @type range: int
@param range: Specifies the number of contiguous empty display lists to be generated. @param range: Specifies the number of contiguous empty display lists to be generated.
@@ -572,7 +572,7 @@ def glGenLists(range):
def glGenTextures(n, textures): def glGenTextures(n, textures):
""" """
Generate texture names Generate texture names
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gentextures.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gentextures.html}
@type n: int @type n: int
@param n: Specifies the number of textures name to be generated. @param n: Specifies the number of textures name to be generated.
@@ -585,7 +585,7 @@ def glGet (pname, param):
B{glGetBooleanv, glGetfloatv, glGetFloatv, glGetIntegerv} B{glGetBooleanv, glGetfloatv, glGetFloatv, glGetIntegerv}
Return the value or values of a selected parameter Return the value or values of a selected parameter
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/get.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/get.html}
@type pname: Enumerated constant @type pname: Enumerated constant
@param pname: Specifies the parameter value to be returned. @param pname: Specifies the parameter value to be returned.
@@ -596,7 +596,7 @@ def glGet (pname, param):
def glGetClipPlane(plane, equation): def glGetClipPlane(plane, equation):
""" """
Return the coefficients of the specified clipping plane Return the coefficients of the specified clipping plane
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getclipplane.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getclipplane.html}
@type plane: Enumerated constant @type plane: Enumerated constant
@param plane: Specifies a clipping plane. The number of clipping planes depends on the @param plane: Specifies a clipping plane. The number of clipping planes depends on the
@@ -610,7 +610,7 @@ def glGetClipPlane(plane, equation):
def glGetError(): def glGetError():
""" """
Return error information Return error information
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/geterror.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html}
""" """
def glGetLight (light, pname, params): def glGetLight (light, pname, params):
@@ -618,7 +618,7 @@ def glGetLight (light, pname, params):
B{glGetLightfv and glGetLightiv} B{glGetLightfv and glGetLightiv}
Return light source parameter values Return light source parameter values
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getlight.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getlight.html}
@type light: Enumerated constant @type light: Enumerated constant
@param light: Specifies a light source. The number of possible lights depends on the @param light: Specifies a light source. The number of possible lights depends on the
@@ -635,7 +635,7 @@ def glGetMap (target, query, v):
B{glGetMapdv, glGetMapfv, glGetMapiv} B{glGetMapdv, glGetMapfv, glGetMapiv}
Return evaluator parameters Return evaluator parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getmap.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmap.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the symbolic name of a map. @param target: Specifies the symbolic name of a map.
@@ -650,7 +650,7 @@ def glGetMaterial (face, pname, params):
B{glGetMaterialfv, glGetMaterialiv} B{glGetMaterialfv, glGetMaterialiv}
Return material parameters Return material parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getmaterial.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmaterial.html}
@type face: Enumerated constant @type face: Enumerated constant
@param face: Specifies which of the two materials is being queried. @param face: Specifies which of the two materials is being queried.
@@ -666,7 +666,7 @@ def glGetPixelMap (map, values):
B{glGetPixelMapfv, glGetPixelMapuiv, glGetPixelMapusv} B{glGetPixelMapfv, glGetPixelMapuiv, glGetPixelMapusv}
Return the specified pixel map Return the specified pixel map
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getpixelmap.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpixelmap.html}
@type map: Enumerated constant @type map: Enumerated constant
@param map: Specifies the name of the pixel map to return. @param map: Specifies the name of the pixel map to return.
@@ -677,7 +677,7 @@ def glGetPixelMap (map, values):
def glGetPolygonStipple(mask): def glGetPolygonStipple(mask):
""" """
Return the polygon stipple pattern Return the polygon stipple pattern
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html}
@type mask: Buffer object I{type GL_BYTE} @type mask: Buffer object I{type GL_BYTE}
@param mask: Returns the stipple pattern. The initial value is all 1's. @param mask: Returns the stipple pattern. The initial value is all 1's.
@@ -686,7 +686,7 @@ def glGetPolygonStipple(mask):
def glGetString(name): def glGetString(name):
""" """
Return a strin describing the current GL connection Return a strin describing the current GL connection
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getstring.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getstring.html}
@type name: Enumerated constant @type name: Enumerated constant
@param name: Specifies a symbolic constant. @param name: Specifies a symbolic constant.
@@ -698,7 +698,7 @@ def glGetTexEnv (target, pname, params):
B{glGetTexEnvfv, glGetTexEnviv} B{glGetTexEnvfv, glGetTexEnviv}
Return texture environment parameters Return texture environment parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexenv.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexenv.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies a texture environment. Must be GL_TEXTURE_ENV. @param target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -713,7 +713,7 @@ def glGetTexGen (coord, pname, params):
B{glGetTexGendv, glGetTexGenfv, glGetTexGeniv} B{glGetTexGendv, glGetTexGenfv, glGetTexGeniv}
Return texture coordinate generation parameters Return texture coordinate generation parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexgen.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexgen.html}
@type coord: Enumerated constant @type coord: Enumerated constant
@param coord: Specifies a texture coordinate. @param coord: Specifies a texture coordinate.
@@ -726,7 +726,7 @@ def glGetTexGen (coord, pname, params):
def glGetTexImage(target, level, format, type, pixels): def glGetTexImage(target, level, format, type, pixels):
""" """
Return a texture image Return a texture image
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/getteximage.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getteximage.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies which texture is to be obtained. @param target: Specifies which texture is to be obtained.
@@ -765,7 +765,7 @@ def glGetTexParameter (target, pname, params):
B{glGetTexParameterfv, glGetTexParameteriv} B{glGetTexParameterfv, glGetTexParameteriv}
Return texture parameter values Return texture parameter values
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexparameter.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexparameter.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the symbolic name of the target texture. @param target: Specifies the symbolic name of the target texture.
@@ -778,7 +778,7 @@ def glGetTexParameter (target, pname, params):
def glHint(target, mode): def glHint(target, mode):
""" """
Specify implementation-specific hints Specify implementation-specific hints
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/hint.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/hint.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies a symbolic constant indicating the behavior to be @param target: Specifies a symbolic constant indicating the behavior to be
@@ -792,7 +792,7 @@ def glIndex (c):
B{glIndexd, glIndexf, glIndexi, glIndexs, glIndexdv, glIndexfv, glIndexiv, glIndexsv} B{glIndexd, glIndexf, glIndexi, glIndexs, glIndexdv, glIndexfv, glIndexiv, glIndexsv}
Set the current color index Set the current color index
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/index_.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/index_.html}
@type c: Buffer object. Depends on function prototype. @type c: Buffer object. Depends on function prototype.
@param c: Specifies a pointer to a one element array that contains the new value for @param c: Specifies a pointer to a one element array that contains the new value for
@@ -802,13 +802,13 @@ def glIndex (c):
def glInitNames(): def glInitNames():
""" """
Initialize the name stack Initialize the name stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/initnames.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/initnames.html}
""" """
def glIsEnabled(cap): def glIsEnabled(cap):
""" """
Test whether a capability is enabled Test whether a capability is enabled
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/isenabled.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/isenabled.html}
@type cap: Enumerated constant @type cap: Enumerated constant
@param cap: Specifies a constant representing a GL capability. @param cap: Specifies a constant representing a GL capability.
@@ -817,7 +817,7 @@ def glIsEnabled(cap):
def glIsList(list): def glIsList(list):
""" """
Determine if a name corresponds to a display-list Determine if a name corresponds to a display-list
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/islist.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/islist.html}
@type list: unsigned int @type list: unsigned int
@param list: Specifies a potential display-list name. @param list: Specifies a potential display-list name.
@@ -826,7 +826,7 @@ def glIsList(list):
def glIsTexture(texture): def glIsTexture(texture):
""" """
Determine if a name corresponds to a texture Determine if a name corresponds to a texture
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/istexture.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/istexture.html}
@type texture: unsigned int @type texture: unsigned int
@param texture: Specifies a value that may be the name of a texture. @param texture: Specifies a value that may be the name of a texture.
@@ -837,7 +837,7 @@ def glLight (light, pname, param):
B{glLightf,glLighti, glLightfv, glLightiv} B{glLightf,glLighti, glLightfv, glLightiv}
Set the light source parameters Set the light source parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/light.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/light.html}
@type light: Enumerated constant @type light: Enumerated constant
@param light: Specifies a light. The number of lights depends on the implementation, @param light: Specifies a light. The number of lights depends on the implementation,
@@ -856,7 +856,7 @@ def glLightModel (pname, param):
B{glLightModelf, glLightModeli, glLightModelfv, glLightModeliv} B{glLightModelf, glLightModeli, glLightModelfv, glLightModeliv}
Set the lighting model parameters Set the lighting model parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/lightmodel.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/lightmodel.html}
@type pname: Enumerated constant @type pname: Enumerated constant
@param pname: Specifies a single-value light model parameter. @param pname: Specifies a single-value light model parameter.
@@ -868,7 +868,7 @@ def glLightModel (pname, param):
def glLineStipple(factor, pattern): def glLineStipple(factor, pattern):
""" """
Specify the line stipple pattern Specify the line stipple pattern
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/linestipple.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linestipple.html}
@type factor: int @type factor: int
@param factor: Specifies a multiplier for each bit in the line stipple pattern. @param factor: Specifies a multiplier for each bit in the line stipple pattern.
@@ -884,7 +884,7 @@ def glLineStipple(factor, pattern):
def glLineWidth(width): def glLineWidth(width):
""" """
Specify the width of rasterized lines. Specify the width of rasterized lines.
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/linewidth.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linewidth.html}
@type width: float @type width: float
@param width: Specifies the width of rasterized lines. The initial value is 1. @param width: Specifies the width of rasterized lines. The initial value is 1.
@@ -893,7 +893,7 @@ def glLineWidth(width):
def glListBase(base): def glListBase(base):
""" """
Set the display-list base for glCallLists Set the display-list base for glCallLists
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/listbase.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/listbase.html}
@type base: unsigned int @type base: unsigned int
@param base: Specifies an integer offset that will be added to glCallLists @param base: Specifies an integer offset that will be added to glCallLists
@@ -903,7 +903,7 @@ def glListBase(base):
def glLoadIdentity(): def glLoadIdentity():
""" """
Replace the current matrix with the identity matrix Replace the current matrix with the identity matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/loadidentity.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadidentity.html}
""" """
def glLoadMatrix (m): def glLoadMatrix (m):
@@ -911,7 +911,7 @@ def glLoadMatrix (m):
B{glLoadMatrixd, glLoadMatixf} B{glLoadMatrixd, glLoadMatixf}
Replace the current matrix with the specified matrix Replace the current matrix with the specified matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/loadmatrix.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadmatrix.html}
@type m: Buffer object. Depends on function prototype. @type m: Buffer object. Depends on function prototype.
@param m: Specifies a pointer to 16 consecutive values, which are used as the elements @param m: Specifies a pointer to 16 consecutive values, which are used as the elements
@@ -921,7 +921,7 @@ def glLoadMatrix (m):
def glLoadName(name): def glLoadName(name):
""" """
Load a name onto the name stack. Load a name onto the name stack.
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/loadname.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadname.html}
@type name: unsigned int @type name: unsigned int
@param name: Specifies a name that will replace the top value on the name stack. @param name: Specifies a name that will replace the top value on the name stack.
@@ -930,7 +930,7 @@ def glLoadName(name):
def glLogicOp(opcode): def glLogicOp(opcode):
""" """
Specify a logical pixel operation for color index rendering Specify a logical pixel operation for color index rendering
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/logicop.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/logicop.html}
@type opcode: Enumerated constant @type opcode: Enumerated constant
@param opcode: Specifies a symbolic constant that selects a logical operation. @param opcode: Specifies a symbolic constant that selects a logical operation.
@@ -941,7 +941,7 @@ def glMap1 (target, u1, u2, stride, order, points):
B{glMap1d, glMap1f} B{glMap1d, glMap1f}
Define a one-dimensional evaluator Define a one-dimensional evaluator
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/map1.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map1.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the kind of values that are generated by the evaluator. @param target: Specifies the kind of values that are generated by the evaluator.
@@ -965,7 +965,7 @@ def glMap2 (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points):
B{glMap2d, glMap2f} B{glMap2d, glMap2f}
Define a two-dimensional evaluator Define a two-dimensional evaluator
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/map2.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map2.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the kind of values that are generated by the evaluator. @param target: Specifies the kind of values that are generated by the evaluator.
@@ -1004,7 +1004,7 @@ def glMapGrid (un, u1,u2 ,vn, v1, v2):
B{glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f} B{glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f}
Define a one- or two-dimensional mesh Define a one- or two-dimensional mesh
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/mapgrid.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/mapgrid.html}
@type un: int @type un: int
@param un: Specifies the number of partitions in the grid range interval @param un: Specifies the number of partitions in the grid range interval
@@ -1022,7 +1022,7 @@ def glMapGrid (un, u1,u2 ,vn, v1, v2):
def glMaterial (face, pname, params): def glMaterial (face, pname, params):
""" """
Specify material parameters for the lighting model. Specify material parameters for the lighting model.
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/material.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/material.html}
@type face: Enumerated constant @type face: Enumerated constant
@param face: Specifies which face or faces are being updated. Must be one of: @param face: Specifies which face or faces are being updated. Must be one of:
@@ -1038,7 +1038,7 @@ def glMaterial (face, pname, params):
def glMatrixMode(mode): def glMatrixMode(mode):
""" """
Specify which matrix is the current matrix. Specify which matrix is the current matrix.
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/matrixmode.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/matrixmode.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies which matrix stack is the target for subsequent matrix operations. @param mode: Specifies which matrix stack is the target for subsequent matrix operations.
@@ -1049,7 +1049,7 @@ def glMultMatrix (m):
B{glMultMatrixd, glMultMatrixf} B{glMultMatrixd, glMultMatrixf}
Multiply the current matrix with the specified matrix Multiply the current matrix with the specified matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/multmatrix.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/multmatrix.html}
@type m: Buffer object. Depends on function prototype. @type m: Buffer object. Depends on function prototype.
@param m: Points to 16 consecutive values that are used as the elements of a 4x4 column @param m: Points to 16 consecutive values that are used as the elements of a 4x4 column
@@ -1059,7 +1059,7 @@ def glMultMatrix (m):
def glNewList(list, mode): def glNewList(list, mode):
""" """
Create or replace a display list Create or replace a display list
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/newlist.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html}
@type list: unsigned int @type list: unsigned int
@param list: Specifies the display list name @param list: Specifies the display list name
@@ -1073,7 +1073,7 @@ def glNormal3 (nx, ny, nz, v):
Normal3s, Normal3sv} Normal3s, Normal3sv}
Set the current normal vector Set the current normal vector
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/normal.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/normal.html}
@type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only) @type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
@param nx, ny, nz: Specify the x, y, and z coordinates of the new current normal. @param nx, ny, nz: Specify the x, y, and z coordinates of the new current normal.
@@ -1086,7 +1086,7 @@ def glNormal3 (nx, ny, nz, v):
def glOrtho(left, right, bottom, top, zNear, zFar): def glOrtho(left, right, bottom, top, zNear, zFar):
""" """
Multiply the current matrix with an orthographic matrix Multiply the current matrix with an orthographic matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/ortho.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/ortho.html}
@type left, right: double (float) @type left, right: double (float)
@param left, right: Specify the coordinates for the left and @param left, right: Specify the coordinates for the left and
@@ -1102,7 +1102,7 @@ def glOrtho(left, right, bottom, top, zNear, zFar):
def glPassThrough(token): def glPassThrough(token):
""" """
Place a marker in the feedback buffer Place a marker in the feedback buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/passthrough.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/passthrough.html}
@type token: float @type token: float
@param token: Specifies a marker value to be placed in the feedback @param token: Specifies a marker value to be placed in the feedback
@@ -1114,7 +1114,7 @@ def glPixelMap (map, mapsize, values):
B{glPixelMapfv, glPixelMapuiv, glPixelMapusv} B{glPixelMapfv, glPixelMapuiv, glPixelMapusv}
Set up pixel transfer maps Set up pixel transfer maps
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pixelmap.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelmap.html}
@type map: Enumerated constant @type map: Enumerated constant
@param map: Specifies a symbolic map name. @param map: Specifies a symbolic map name.
@@ -1129,7 +1129,7 @@ def glPixelStore (pname, param):
B{glPixelStoref, glPixelStorei} B{glPixelStoref, glPixelStorei}
Set pixel storage modes Set pixel storage modes
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pixelstore.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelstore.html}
@type pname: Enumerated constant @type pname: Enumerated constant
@param pname: Specifies the symbolic name of the parameter to be set. @param pname: Specifies the symbolic name of the parameter to be set.
@@ -1144,7 +1144,7 @@ def glPixelTransfer (pname, param):
B{glPixelTransferf, glPixelTransferi} B{glPixelTransferf, glPixelTransferi}
Set pixel transfer modes Set pixel transfer modes
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pixeltransfer.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixeltransfer.html}
@type pname: Enumerated constant @type pname: Enumerated constant
@param pname: Specifies the symbolic name of the pixel transfer parameter to be set. @param pname: Specifies the symbolic name of the pixel transfer parameter to be set.
@@ -1155,7 +1155,7 @@ def glPixelTransfer (pname, param):
def glPixelZoom(xfactor, yfactor): def glPixelZoom(xfactor, yfactor):
""" """
Specify the pixel zoom factors Specify the pixel zoom factors
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pixelzoom.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelzoom.html}
@type xfactor, yfactor: float @type xfactor, yfactor: float
@param xfactor, yfactor: Specify the x and y zoom factors for pixel write operations. @param xfactor, yfactor: Specify the x and y zoom factors for pixel write operations.
@@ -1164,7 +1164,7 @@ def glPixelZoom(xfactor, yfactor):
def glPointSize(size): def glPointSize(size):
""" """
Specify the diameter of rasterized points Specify the diameter of rasterized points
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pointsize.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pointsize.html}
@type size: float @type size: float
@param size: Specifies the diameter of rasterized points. The initial value is 1. @param size: Specifies the diameter of rasterized points. The initial value is 1.
@@ -1173,7 +1173,7 @@ def glPointSize(size):
def glPolygonMode(face, mode): def glPolygonMode(face, mode):
""" """
Select a polygon rasterization mode Select a polygon rasterization mode
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/polygonmode.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonmode.html}
@type face: Enumerated constant @type face: Enumerated constant
@param face: Specifies the polygons that mode applies to. @param face: Specifies the polygons that mode applies to.
@@ -1187,7 +1187,7 @@ def glPolygonMode(face, mode):
def glPolygonOffset(factor, units): def glPolygonOffset(factor, units):
""" """
Set the scale and units used to calculate depth values Set the scale and units used to calculate depth values
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/polygonoffset.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonoffset.html}
@type factor: float @type factor: float
@param factor: Specifies a scale factor that is used to create a variable depth @param factor: Specifies a scale factor that is used to create a variable depth
@@ -1200,7 +1200,7 @@ def glPolygonOffset(factor, units):
def glPolygonStipple(mask): def glPolygonStipple(mask):
""" """
Set the polygon stippling pattern Set the polygon stippling pattern
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/polygonstipple.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonstipple.html}
@type mask: Buffer object I{type GL_BYTE} @type mask: Buffer object I{type GL_BYTE}
@param mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked @param mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked
@@ -1210,25 +1210,25 @@ def glPolygonStipple(mask):
def glPopAttrib(): def glPopAttrib():
""" """
Pop the server attribute stack Pop the server attribute stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pushattrib.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html}
""" """
def glPopMatrix(): def glPopMatrix():
""" """
Pop the current matrix stack Pop the current matrix stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pushmatrix.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html}
""" """
def glPopName(): def glPopName():
""" """
Pop the name stack Pop the name stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pushname.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html}
""" """
def glPrioritizeTextures(n, textures, priorities): def glPrioritizeTextures(n, textures, priorities):
""" """
Set texture residence priority Set texture residence priority
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/prioritizetextures.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/prioritizetextures.html}
@type n: int @type n: int
@param n:Specifies the number of textures to be prioritized. @param n:Specifies the number of textures to be prioritized.
@@ -1242,7 +1242,7 @@ def glPrioritizeTextures(n, textures, priorities):
def glPushAttrib(mask): def glPushAttrib(mask):
""" """
Push the server attribute stack Push the server attribute stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pushattrib.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html}
@type mask: Enumerated constant(s) @type mask: Enumerated constant(s)
@param mask: Specifies a mask that indicates which attributes to save. @param mask: Specifies a mask that indicates which attributes to save.
@@ -1251,13 +1251,13 @@ def glPushAttrib(mask):
def glPushMatrix(): def glPushMatrix():
""" """
Push the current matrix stack Push the current matrix stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pushmatrix.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html}
""" """
def glPushName(name): def glPushName(name):
""" """
Push the name stack Push the name stack
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/pushname.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html}
@type name: unsigned int @type name: unsigned int
@param name: Specifies a name that will be pushed onto the name stack. @param name: Specifies a name that will be pushed onto the name stack.
@@ -1272,7 +1272,7 @@ def glRasterPos (x,y,z,w):
glRasterPos4dv, glRasterPos4fv, glRasterPos4iv, glRasterPos4sv} glRasterPos4dv, glRasterPos4fv, glRasterPos4iv, glRasterPos4sv}
Specify the raster position for pixel operations Specify the raster position for pixel operations
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/rasterpos.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rasterpos.html}
@type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only) @type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
@param x,y,z,w: Specify the x,y,z, and w object coordinates (if present) for the @param x,y,z,w: Specify the x,y,z, and w object coordinates (if present) for the
@@ -1283,7 +1283,7 @@ def glRasterPos (x,y,z,w):
def glReadBuffer(mode): def glReadBuffer(mode):
""" """
Select a color buffer source for pixels. Select a color buffer source for pixels.
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/readbuffer.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies a color buffer. @param mode: Specifies a color buffer.
@@ -1292,7 +1292,7 @@ def glReadBuffer(mode):
def glReadPixels(x, y, width, height, format, type, pixels): def glReadPixels(x, y, width, height, format, type, pixels):
""" """
Read a block of pixels from the frame buffer Read a block of pixels from the frame buffer
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/readpixels.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html}
@type x,y: int @type x,y: int
@param x,y:Specify the window coordinates of the first pixel that is read @param x,y:Specify the window coordinates of the first pixel that is read
@@ -1314,7 +1314,7 @@ def glRect (x1,y1,x2,y2,v1,v2):
B{glRectd, glRectf, glRecti, glRects, glRectdv, glRectfv, glRectiv, glRectsv} B{glRectd, glRectf, glRecti, glRects, glRectdv, glRectfv, glRectiv, glRectsv}
Draw a rectangle Draw a rectangle
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/rect.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rect.html}
@type x1, y1: Depends on function prototype. (for non 'v' prototypes only) @type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
@param x1, y1: Specify one vertex of a rectangle @param x1, y1: Specify one vertex of a rectangle
@@ -1328,7 +1328,7 @@ def glRect (x1,y1,x2,y2,v1,v2):
def glRenderMode(mode): def glRenderMode(mode):
""" """
Set rasterization mode Set rasterization mode
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/rendermode.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rendermode.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies the rasterization mode. @param mode: Specifies the rasterization mode.
@@ -1339,7 +1339,7 @@ def glRotate (angle, x, y, z):
B{glRotated, glRotatef} B{glRotated, glRotatef}
Multiply the current matrix by a rotation matrix Multiply the current matrix by a rotation matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/rotate.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rotate.html}
@type angle: Depends on function prototype. @type angle: Depends on function prototype.
@param angle: Specifies the angle of rotation in degrees. @param angle: Specifies the angle of rotation in degrees.
@@ -1352,7 +1352,7 @@ def glScale (x,y,z):
B{glScaled, glScalef} B{glScaled, glScalef}
Multiply the current matrix by a general scaling matrix Multiply the current matrix by a general scaling matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/scale.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scale.html}
@type x,y,z: Depends on function prototype. @type x,y,z: Depends on function prototype.
@param x,y,z: Specify scale factors along the x,y, and z axes, respectively. @param x,y,z: Specify scale factors along the x,y, and z axes, respectively.
@@ -1361,7 +1361,7 @@ def glScale (x,y,z):
def glScissor(x,y,width,height): def glScissor(x,y,width,height):
""" """
Define the scissor box Define the scissor box
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/scissor.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scissor.html}
@type x,y: int @type x,y: int
@param x,y: Specify the lower left corner of the scissor box. Initially (0, 0). @param x,y: Specify the lower left corner of the scissor box. Initially (0, 0).
@@ -1374,7 +1374,7 @@ def glScissor(x,y,width,height):
def glSelectBuffer(size, buffer): def glSelectBuffer(size, buffer):
""" """
Establish a buffer for selection mode values Establish a buffer for selection mode values
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/selectbuffer.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/selectbuffer.html}
@type size: int @type size: int
@param size: Specifies the size of buffer @param size: Specifies the size of buffer
@@ -1385,7 +1385,7 @@ def glSelectBuffer(size, buffer):
def glShadeModel(mode): def glShadeModel(mode):
""" """
Select flat or smooth shading Select flat or smooth shading
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/shademodel.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/shademodel.html}
@type mode: Enumerated constant @type mode: Enumerated constant
@param mode: Specifies a symbolic value representing a shading technique. @param mode: Specifies a symbolic value representing a shading technique.
@@ -1394,7 +1394,7 @@ def glShadeModel(mode):
def glStencilFuc(func, ref, mask): def glStencilFuc(func, ref, mask):
""" """
Set function and reference value for stencil testing Set function and reference value for stencil testing
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/stencilfunc.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilfunc.html}
@type func: Enumerated constant @type func: Enumerated constant
@param func:Specifies the test function. @param func:Specifies the test function.
@@ -1410,7 +1410,7 @@ def glStencilFuc(func, ref, mask):
def glStencilMask(mask): def glStencilMask(mask):
""" """
Control the writing of individual bits in the stencil planes Control the writing of individual bits in the stencil planes
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/stencilmask.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilmask.html}
@type mask: unsigned int @type mask: unsigned int
@param mask: Specifies a bit mask to enable and disable writing of individual bits @param mask: Specifies a bit mask to enable and disable writing of individual bits
@@ -1420,7 +1420,7 @@ def glStencilMask(mask):
def glStencilOp(fail, zfail, zpass): def glStencilOp(fail, zfail, zpass):
""" """
Set stencil test actions Set stencil test actions
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/stencilop.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilop.html}
@type fail: Enumerated constant @type fail: Enumerated constant
@param fail: Specifies the action to take when the stencil test fails. @param fail: Specifies the action to take when the stencil test fails.
@@ -1446,7 +1446,7 @@ def glTexCoord (s,t,r,q,v):
glTexCoord4dv, glTexCoord4fv, glTexCoord4iv, glTexCoord4sv} glTexCoord4dv, glTexCoord4fv, glTexCoord4iv, glTexCoord4sv}
Set the current texture coordinates Set the current texture coordinates
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/texcoord.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texcoord.html}
@type s,t,r,q: Depends on function prototype. (r and q for '3' and '4' prototypes only) @type s,t,r,q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
@param s,t,r,q: Specify s, t, r, and q texture coordinates. Not all parameters are @param s,t,r,q: Specify s, t, r, and q texture coordinates. Not all parameters are
@@ -1461,7 +1461,7 @@ def glTexEnv (target, pname, param):
B{glTextEnvf, glTextEnvi, glTextEnvfv, glTextEnviv} B{glTextEnvf, glTextEnvi, glTextEnvfv, glTextEnviv}
Set texture environment parameters Set texture environment parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/texenv.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texenv.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies a texture environment. Must be GL_TEXTURE_ENV. @param target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -1479,7 +1479,7 @@ def glTexGen (coord, pname, param):
B{glTexGend, glTexGenf, glTexGeni, glTexGendv, glTexGenfv, glTexGeniv} B{glTexGend, glTexGenf, glTexGeni, glTexGendv, glTexGenfv, glTexGeniv}
Control the generation of texture coordinates Control the generation of texture coordinates
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/texgen.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texgen.html}
@type coord: Enumerated constant @type coord: Enumerated constant
@param coord: Specifies a texture coordinate. @param coord: Specifies a texture coordinate.
@@ -1496,7 +1496,7 @@ def glTexGen (coord, pname, param):
def glTexImage1D(target, level, internalformat, width, border, format, type, pixels): def glTexImage1D(target, level, internalformat, width, border, format, type, pixels):
""" """
Specify a one-dimensional texture image Specify a one-dimensional texture image
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/teximage1d.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage1d.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the target texture. @param target: Specifies the target texture.
@@ -1522,7 +1522,7 @@ def glTexImage1D(target, level, internalformat, width, border, format, type, pix
def glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels): def glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels):
""" """
Specify a two-dimensional texture image Specify a two-dimensional texture image
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/teximage2d.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage2d.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the target texture. @param target: Specifies the target texture.
@@ -1554,7 +1554,7 @@ def glTexParameter (target, pname, param):
B{glTexParameterf, glTexParameteri, glTexParameterfv, glTexParameteriv} B{glTexParameterf, glTexParameteri, glTexParameterfv, glTexParameteriv}
Set texture parameters Set texture parameters
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/texparameter.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texparameter.html}
@type target: Enumerated constant @type target: Enumerated constant
@param target: Specifies the target texture. @param target: Specifies the target texture.
@@ -1570,7 +1570,7 @@ def glTranslate (x, y, z):
B{glTranslatef, glTranslated} B{glTranslatef, glTranslated}
Multiply the current matrix by a translation matrix Multiply the current matrix by a translation matrix
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/translate.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/translate.html}
@type x,y,z: Depends on function prototype. @type x,y,z: Depends on function prototype.
@param x,y,z: Specify the x, y, and z coordinates of a translation vector. @param x,y,z: Specify the x, y, and z coordinates of a translation vector.
@@ -1584,7 +1584,7 @@ def glVertex (x,y,z,w,v):
glVertex4fv, glVertex4iv, glVertex4sv} glVertex4fv, glVertex4iv, glVertex4sv}
Specify a vertex Specify a vertex
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/vertex.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/vertex.html}
@type x,y,z,w: Depends on function prototype (z and w for '3' and '4' prototypes only) @type x,y,z,w: Depends on function prototype (z and w for '3' and '4' prototypes only)
@param x,y,z,w: Specify x, y, z, and w coordinates of a vertex. Not all parameters @param x,y,z,w: Specify x, y, z, and w coordinates of a vertex. Not all parameters
@@ -1598,7 +1598,7 @@ def glVertex (x,y,z,w,v):
def glViewport(x,y,width,height): def glViewport(x,y,width,height):
""" """
Set the viewport Set the viewport
@see: U{www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/viewport.html} @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/viewport.html}
@type x,y: int @type x,y: int
@param x,y: Specify the lower left corner of the viewport rectangle, @param x,y: Specify the lower left corner of the viewport rectangle,
@@ -1611,7 +1611,7 @@ def glViewport(x,y,width,height):
def gluPerspective(fovY, aspect, zNear, zFar): def gluPerspective(fovY, aspect, zNear, zFar):
""" """
Set up a perspective projection matrix. Set up a perspective projection matrix.
@see: U{http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/ch06.html#id5557116} @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5577288}
@type fovY: double @type fovY: double
@param fovY: Specifies the field of view angle, in degrees, in the y direction. @param fovY: Specifies the field of view angle, in degrees, in the y direction.
@@ -1627,7 +1627,7 @@ def gluPerspective(fovY, aspect, zNear, zFar):
def gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz): def gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz):
""" """
Define a viewing transformation Define a viewing transformation
@see: U{http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/ch06.html#id5552781} @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5573042}
@type eyex, eyey, eyez: double @type eyex, eyey, eyez: double
@param eyex, eyey, eyez: Specifies the position of the eye point. @param eyex, eyey, eyez: Specifies the position of the eye point.
@@ -1640,7 +1640,7 @@ def gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz):
def gluOrtho2D(left, right, bottom, top): def gluOrtho2D(left, right, bottom, top):
""" """
Define a 2-D orthographic projection matrix Define a 2-D orthographic projection matrix
@see: U{http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/ch06.html#id5556407} @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5578074}
@type left, right: double @type left, right: double
@param left, right: Specify the coordinates for the left and right vertical clipping planes. @param left, right: Specify the coordinates for the left and right vertical clipping planes.
@@ -1651,7 +1651,7 @@ def gluOrtho2D(left, right, bottom, top):
def gluPickMatrix(x, y, width, height, viewport): def gluPickMatrix(x, y, width, height, viewport):
""" """
Define a picking region Define a picking region
@see: U{http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/ch06.html#id5557442} @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5578074}
@type x, y: double @type x, y: double
@param x, y: Specify the center of a picking region in window coordinates. @param x, y: Specify the center of a picking region in window coordinates.
@@ -1664,7 +1664,7 @@ def gluPickMatrix(x, y, width, height, viewport):
def gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz): def gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz):
""" """
Map object coordinates to window coordinates. Map object coordinates to window coordinates.
@see: U{http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/ch06.html#id5557853} @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5578074}
@type objx, objy, objz: double @type objx, objy, objz: double
@param objx, objy, objz: Specify the object coordinates. @param objx, objy, objz: Specify the object coordinates.
@@ -1682,7 +1682,7 @@ def gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, objx, objy
""" """
Map object coordinates to window Map object coordinates to window
coordinates. coordinates.
@see: U{http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_RM/sgi_html/ch06.html#id5557853} @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5582204}
@type winx, winy, winz: double @type winx, winy, winz: double
@param winx, winy, winz: Specify the window coordinates to be mapped. @param winx, winy, winz: Specify the window coordinates to be mapped.

View File

@@ -6,7 +6,9 @@ The Blender.Draw submodule.
Draw Draw
==== ====
B{New}: access to ascii values in L{events<Register>} callbacks. B{New}:
- access to ascii values in L{events<Register>} callbacks;
- 'large' fonts for L{Text} and L{GetStringWidth}.
This module provides access to a B{windowing interface} in Blender. Its widgets This module provides access to a B{windowing interface} in Blender. Its widgets
include many kinds of buttons: push, toggle, menu, number, string, slider, include many kinds of buttons: push, toggle, menu, number, string, slider,
@@ -596,7 +598,7 @@ def GetStringWidth(string, fontsize = 'normal'):
@type string: string @type string: string
@param string: A string. @param string: A string.
@type fontsize: string @type fontsize: string
@param fontsize: The size of the font: 'normal', 'small' or 'tiny'. @param fontsize: The size of the font: 'large', 'normal', 'small' or 'tiny'.
@rtype: int @rtype: int
@return: The width of I{string} with the chosen I{fontsize}. @return: The width of I{string} with the chosen I{fontsize}.
""" """
@@ -607,7 +609,7 @@ def Text(string, fontsize = 'normal'):
@type string: string @type string: string
@param string: The text string to draw. @param string: The text string to draw.
@type fontsize: string @type fontsize: string
@param fontsize: The size of the font: 'normal', 'small' or 'tiny'. @param fontsize: The size of the font: 'large', 'normal', 'small' or 'tiny'.
@rtype: int @rtype: int
@return: The width of I{string} drawn with the chosen I{fontsize}. @return: The width of I{string} drawn with the chosen I{fontsize}.
""" """

View File

@@ -3,9 +3,12 @@
""" """
The Blender.NMesh submodule. The Blender.NMesh submodule.
B{New}: edges class (L{NMEdge}) and nmesh methods (L{NMesh.addEdge}, B{New}:
L{NMesh.addEdgesData}, etc.); new optional arguments to L{NMesh.update}; - edges class (L{NMEdge}) and nmesh methods (L{NMesh.addEdge},
L{NMesh.transform}. L{NMesh.addEdgesData}, etc.);
- new optional arguments to L{NMesh.update};
- L{NMesh.transform};
- L{GetNames}.
Mesh Data Mesh Data
========= =========
@@ -135,6 +138,14 @@ def GetRaw(name = None):
- () - A new (empty) NMesh object. - () - A new (empty) NMesh object.
""" """
def GetNames():
"""
Get a list with the names of all available meshes in Blender.
@rtype: list of strings
@return: a list of mesh names.
@note: to get actual mesh data, pass a mesh name to L{GetRaw}.
"""
def GetRawFromObject(name): def GetRawFromObject(name):
""" """
Get the raw mesh data object from the Object in Blender called I{name}.\n Get the raw mesh data object from the Object in Blender called I{name}.\n

View File

@@ -7,6 +7,7 @@ B{New}:
- L{Scene.clearScriptLinks} accepts a parameter now. - L{Scene.clearScriptLinks} accepts a parameter now.
- L{Scene.getLayers}, L{Scene.setLayers} and the L{layers<Scene.layers>} and - L{Scene.getLayers}, L{Scene.setLayers} and the L{layers<Scene.layers>} and
L{Layers<Scene.Layers>} Scene attributes. L{Layers<Scene.Layers>} Scene attributes.
- L{Scene.getActiveObject} method.
Scene Scene
===== =====
@@ -189,6 +190,20 @@ class Scene:
particular scene. particular scene.
""" """
def getActiveObject():
"""
Get this scene's active object.
@note: the active object, if selected, can also be retrieved with
L{Object.GetSelected} -- it is the first item in the returned
list. But even when no object is selected in Blender, there can be
an active one (if the user enters editmode, for example, this is the
object that should become available for edition). So what makes this
scene method different from C{Object.GetSelected()[0]} is that it can
return the active object even when no objects are selected.
@rtype: Blender Object or None
@return: the active object or None if not available.
"""
def getCurrentCamera(): def getCurrentCamera():
""" """
Get the currently active Camera for this Scene. Get the currently active Camera for this Scene.

View File

@@ -2016,17 +2016,21 @@ PyObject *RenderData_EnableSGICosmo( BPy_RenderData * self, PyObject * args )
//------------------------------------RenderData.OldMapValue() ----------- //------------------------------------RenderData.OldMapValue() -----------
PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args ) PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
{ {
return M_Render_GetSetAttributeShort( args, PyObject *tmp = M_Render_GetSetAttributeShort(args,
&self->renderContext->framapto, &self->renderContext->framapto, 1, 900);
1, 900 ); self->renderContext->framelen =
(float)self->renderContext->framapto / self->renderContext->images;
return tmp;
} }
//------------------------------------RenderData.NewMapValue() ----------- //------------------------------------RenderData.NewMapValue() -----------
PyObject *RenderData_NewMapValue( BPy_RenderData * self, PyObject * args ) PyObject *RenderData_NewMapValue( BPy_RenderData * self, PyObject * args )
{ {
return M_Render_GetSetAttributeShort( args, PyObject *tmp = M_Render_GetSetAttributeShort(args,
&self->renderContext->images, 1, &self->renderContext->images, 1, 900);
900 ); self->renderContext->framelen =
(float)self->renderContext->framapto / self->renderContext->images;
return tmp;
} }
//------------------------------------RenderData.getTimeCode() ----------- //------------------------------------RenderData.getTimeCode() -----------