[Bf-committers] exppython OS X
Willian Padovani Germano
bf-committers@blender.org
14 Jun 2003 06:53:05 -0300
On Fri, 2003-06-13 at 05:58, Ton Roosendaal wrote:
> I have OSX 10.2.6 here too.
> Just compiled with regular makefiles, with "setenv EXPYTHON=true". It
> compiles the lib and links it, and blender opens just fine.
So it's probably not a problem with OS X in general. Good : ), thanks,
Ton.
Michael, the next thing you could try is make sure that your cvs copy
isn't messed up. Simply deleting the source/blender/python/ dir and
doing a cvs update should be enough.
Anyway, we'll soon have more people testing on all systems, so pending
problems won't go unnoticed.
> Now, where is a good testing python script to load & run? Also to find
> out if it *really* uses the new python?
import Blender
print dir(Blender)
is enough to know if exppython is in place. The output to the console
should be:
In BPY_txt_do_python
Using a clean Global Dictionary.
Run Python script "Text" ...
['Armature', 'BGL', 'Camera', 'Curve', 'Draw', 'Get', 'Image', 'Ipo',
'Lamp', 'Material', 'Metaball', 'NMesh', 'Object', 'Redraw',
'ReleaseGlobalDict', 'Scene', 'Set', 'Text', 'Types', 'Window',
'__doc__', '__name__', 'bylink', 'event', 'link']
Note modules like Armature, Curve and Metaball above, they are not
present in 2.27, so if you see them, it's exppython.
I'm attaching a piece of script that implements a simple file selector,
using Draw and BGL. All this piece does is let you choose a file in a
blue screen, then it complains about it in a red screen. If you got
that, it's working fine.
Another simple test, using the real FileSelector:
#-----------
import Blender as b
def f(fname):
print "\nYou chose this file: %s\n" % fname
b.Window.FileSelector(f, "Choose one!")
#b.Window.ImageSelector(f, "Choose one!")
#-----------
To test also the ImageSelector, comment ("#") the FileSelector line and
uncomment the one below it, of course.
** Please do a cvs update before. FileSelector and ImageSelector
started crashing Blender. More recent changes in another file caused
that, but now it should be fixed.
--
Willian, wgermano@ig.com.br