make BGL and BLF modile names lowercase

This commit is contained in:
Campbell Barton
2010-02-28 14:57:26 +00:00
parent c1cd33e166
commit ed7f4f2e3c
11 changed files with 26 additions and 26 deletions

View File

@@ -190,7 +190,7 @@ def banner(context):
add_scrollback("Execute: Enter", 'OUTPUT') add_scrollback("Execute: Enter", 'OUTPUT')
add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT') add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT')
add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT') add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT')
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, Mathutils, Geometry, BGL", 'OUTPUT') add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, Mathutils, Geometry", 'OUTPUT')
add_scrollback("", 'OUTPUT') add_scrollback("", 'OUTPUT')
add_scrollback("", 'OUTPUT') add_scrollback("", 'OUTPUT')
sc.prompt = PROMPT sc.prompt = PROMPT

View File

@@ -1,29 +1,29 @@
import BGL import bgl
import BLF import blf
def draw_callback_px(self, context): def draw_callback_px(self, context):
print("mouse points", len(self.mouse_path)) print("mouse points", len(self.mouse_path))
# draw some text # draw some text
BLF.position(15, 30, 0) blf.position(15, 30, 0)
BLF.size(20, 72) blf.size(20, 72)
BLF.draw("Hello Word " + str(len(self.mouse_path))) blf.draw("Hello Word " + str(len(self.mouse_path)))
# 50% alpha, 2 pixel width line # 50% alpha, 2 pixel width line
BGL.glEnable(BGL.GL_BLEND) bgl.glEnable(bgl.GL_BLEND)
BGL.glColor4f(0.0, 0.0, 0.0, 0.5) bgl.glColor4f(0.0, 0.0, 0.0, 0.5)
BGL.glLineWidth(2) bgl.glLineWidth(2)
BGL.glBegin(BGL.GL_LINE_STRIP) bgl.glBegin(bgl.GL_LINE_STRIP)
for x, y in self.mouse_path: for x, y in self.mouse_path:
BGL.glVertex2i(x, y) bgl.glVertex2i(x, y)
BGL.glEnd() bgl.glEnd()
# restore opengl defaults # restore opengl defaults
BGL.glLineWidth(1) bgl.glLineWidth(1)
BGL.glDisable(BGL.GL_BLEND) bgl.glDisable(bgl.GL_BLEND)
BGL.glColor4f(0.0, 0.0, 0.0, 1.0) bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
class ModalDrawOperator(bpy.types.Operator): class ModalDrawOperator(bpy.types.Operator):

View File

@@ -333,7 +333,7 @@ def rna2sphinx(BASEPATH):
del module del module
import BLF as module import BLF as module
pymodule2sphinx(BASEPATH, "BLF", module, "Blender Font Drawing (BLF)") pymodule2sphinx(BASEPATH, "blf", module, "Blender Font Drawing (blf)")
del module del module
if 0: if 0:

View File

@@ -32,7 +32,7 @@
* implementation. The BGL submodule "wraps" OpenGL functions and constants, * implementation. The BGL submodule "wraps" OpenGL functions and constants,
* allowing script writers to make OpenGL calls in their Python scripts. */ * allowing script writers to make OpenGL calls in their Python scripts. */
#include "BGL.h" /*This must come first */ #include "bgl.h" /*This must come first */
#include <GL/glew.h> #include <GL/glew.h>
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
@@ -1095,7 +1095,7 @@ static struct PyMethodDef BGL_methods[] = {
static struct PyModuleDef BGL_module_def = { static struct PyModuleDef BGL_module_def = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"BGL", /* m_name */ "bgl", /* m_name */
0, /* m_doc */ 0, /* m_doc */
0, /* m_size */ 0, /* m_size */
BGL_methods, /* m_methods */ BGL_methods, /* m_methods */

View File

@@ -23,7 +23,7 @@
*/ */
#include <Python.h> #include <Python.h>
#include "BLF.h" #include "blf.h"
#include "../../blenfont/BLF_api.h" #include "../../blenfont/BLF_api.h"
@@ -175,7 +175,7 @@ static char BLF_doc[] =
static struct PyModuleDef BLF_module_def = { static struct PyModuleDef BLF_module_def = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"BLF", /* m_name */ "blf", /* m_name */
BLF_doc, /* m_doc */ BLF_doc, /* m_doc */
0, /* m_size */ 0, /* m_size */
BLF_methods, /* m_methods */ BLF_methods, /* m_methods */

View File

@@ -37,8 +37,8 @@
/* external util modules */ /* external util modules */
#include "../generic/Mathutils.h" #include "../generic/Mathutils.h"
#include "../generic/Geometry.h" #include "../generic/Geometry.h"
#include "../generic/BGL.h" #include "../generic/bgl.h"
#include "../generic/BLF.h" #include "../generic/blf.h"
#include "../generic/IDProp.h" #include "../generic/IDProp.h"
static char bpy_home_paths_doc[] = static char bpy_home_paths_doc[] =

View File

@@ -40,7 +40,7 @@ extern "C" {
#include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */ #include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
#include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use. #include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use.
#include "Geometry.h" // Blender.Geometry module copied here so the blenderlayer can use. #include "Geometry.h" // Blender.Geometry module copied here so the blenderlayer can use.
#include "BGL.h" #include "bgl.h"
#include "marshal.h" /* python header for loading/saving dicts */ #include "marshal.h" /* python header for loading/saving dicts */
} }
@@ -1622,7 +1622,7 @@ PyObject *KXpy_import(PyObject *self, PyObject *args)
/* quick hack for GamePython modules /* quick hack for GamePython modules
TODO: register builtin modules properly by ExtendInittab */ TODO: register builtin modules properly by ExtendInittab */
if (!strcmp(name, "GameLogic") || !strcmp(name, "GameKeys") || !strcmp(name, "PhysicsConstraints") || if (!strcmp(name, "GameLogic") || !strcmp(name, "GameKeys") || !strcmp(name, "PhysicsConstraints") ||
!strcmp(name, "Rasterizer") || !strcmp(name, "Mathutils") || !strcmp(name, "BGL") || !strcmp(name, "Geometry")) { !strcmp(name, "Rasterizer") || !strcmp(name, "Mathutils") || !strcmp(name, "bgl") || !strcmp(name, "Geometry")) {
return PyImport_ImportModuleEx(name, globals, locals, fromlist); return PyImport_ImportModuleEx(name, globals, locals, fromlist);
} }

View File

@@ -22,7 +22,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include "ImageBase.h" #include "ImageBase.h"
extern "C" { extern "C" {
#include "BGL.h" #include "bgl.h"
} }
#include "GL/glew.h" #include "GL/glew.h"

View File

@@ -34,7 +34,7 @@ http://www.gnu.org/copyleft/lesser.txt.
extern "C" { extern "C" {
#include "IMB_imbuf_types.h" #include "IMB_imbuf_types.h"
#include "IMB_imbuf.h" #include "IMB_imbuf.h"
#include "BGL.h" #include "bgl.h"
}; };
// default filter // default filter