[Bf-funboard] Script Error

Roger hovergo at net-tech.com.au
Thu Oct 11 11:33:14 CEST 2007

Helping my daughter to design an easier UI for Blender.
I can run a small button placement script from Blender 244 but when run from a
terminal in Linux I get an error

Blender quit
[roger at localhost ~]$ blender aaGUIscript.py
guessing './Blender/244/blender244/blender244' ==
Compiled with Python version 2.4.1.
Checking for installed Python... got it!
libGL warning: 3D driver claims to not support visual 0x4b

Blender quit
Works in Blender but not from a terminal
Seems like the dreaded " libGL warning: 3D driver claims to not support visual
0x4b" excuse
is selective, stops some scripts but not others..
Can someone help plese.

I have 4 buttons and when I program another button I get an error

Script below
import Blender  # This will import the library of blender functions we will use

def draw():     # Define the draw function (which draws your GUI).
# This clears the window

# Add here drawing commands to draw your GUI, for example:
##-- positions. 1=button number.
##--10=from left, 580=from bottom, 100=width of button
##-- 20= height of button, 0 or 1= button activated or not ---

         Blender.Draw.Toggle("Save",1,10,586,100,20,0,"Save Work")
         Blender.Draw.Toggle("Create",2,10,564,100,20,0,"Create 3D Objects.
Plane,Box,Sphere, Cylinder, etc")
Polys(faces) Elements, etc")
         Blender.Draw.Toggle("Modify",4,10,520,100,20,0,"Scale, Group, Add
Textures, etc")
# The line above will draw a toggle button.
# Note the first number, '1' means this is button number 1

def event(evt,val):  # Define mouse and keyboard press events
         if evt == Blender.Draw.ESCKEY: # Example if esc key pressed
						Blender.Draw.Exit()    # then exit script
         return                 # return from the function


def button(evt):     # Define what to do if a button is pressed, for example:
         if evt == 5: # If button '5' is pressed, exit the menu:
#            Blender.Scene.GetCurrent().getActiveObject().loc = (0,0,0)
#            Blender.Window.Redraw() # This will redraw the 3d window.

# You can now run the Graphical User Interface by typing the command:


More information about the Bf-funboard mailing list