Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-19 20:17:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-19 20:17:35 +0400
commitd9e99abe3753591d510dbb58813bbc29e3381b57 (patch)
tree85d247d274f8c9d2650f6df4d3c8a6ac2f25e7bc /doc
parentddf207b7c3d1cafb0485da268608b1fc875c13f0 (diff)
hide overly picky warnings from 'pylint' for pep8 script, indentation edits.
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/epy/testbgl.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/doc/python_api/epy/testbgl.py b/doc/python_api/epy/testbgl.py
deleted file mode 100644
index e895d01df69..00000000000
--- a/doc/python_api/epy/testbgl.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Testing the BGL module
-
-import Blender
-from Blender.BGL import *
-from Blender import Draw
-
-R = G = B = 0
-A = 1
-
-instructions = "Hold mouse buttons to change the background color."
-quitting = " Press ESC or q to quit."
-
-def show_win():
- glClearColor(R,G,B,A) # define color used to clear buffers
- glClear(GL_COLOR_BUFFER_BIT) # use it to clear the color buffer
- glColor3f(1,1,1) # change default color
- glRasterPos2i(50,100) # move cursor to x = 50, y = 100
- Draw.Text("Testing BGL + Draw") # draw this text there
- glRasterPos2i(350,20) # move cursor again
- Draw.Text(instructions + quitting) # draw another msg
- glBegin(GL_LINE_LOOP) # begin a vertex-data list
- glVertex2i(46,92)
- glVertex2i(120,92)
- glVertex2i(120,115)
- glVertex2i(46,115)
- glEnd() # close this list
- glColor3f(0.35,0.18,0.92) # change default color again
- glBegin(GL_POLYGON) # another list, for a polygon
- glVertex2i(315, 292)
- glVertex2i(412, 200)
- glVertex2i(264, 256)
- glEnd()
- Draw.Redraw(1) # make changes visible.
-
-def ev(evt, val): # this is a callback for Draw.Register()
- global R,G,B,A # it handles input events
- if evt == Draw.ESCKEY or evt == Draw.QKEY:
- Draw.Exit() # this quits the script
- elif evt == Draw.LEFTMOUSE: R = 1 - R
- elif evt == Draw.MIDDLEMOUSE: G = 1 - G
- elif evt == Draw.RIGHTMOUSE: B = 1 - B
- else:
- Draw.Register(show_win, ev, None)
-
-Draw.Register(show_win, ev, None) # start the main loop