[Bf-committers] Blender.UI? (Re: properties per datablock & python)

Toni Alatalo antont at kyperjokki.fi
Sun May 18 10:00:04 CEST 2008

Mathias Panzenböck kirjoitti:
> I wrote a little abstraction layer for blenders GUI functionality. I think the python 
> API to draw GUIs is very ugly. My abstraction layer makes it much more object 
> oriented and declarative (you create a button and it will be displayed until you 

you must be about the hundredth person to do that :(

which if course means that what you say is true, Draw is not a nice way 
to make UIs, which is why a large part of *many* scripts has for long 
been their own UI wrapper thing over the bpython stuff. some of those 
have been packaged as libs to be nicely reusable, one such was ScriptUI 
by someone (sorry I don't remember who) which I've reused in some 
scripts long ago. i've wished and suggested for long that someone would 
take a look at those libs and perhaps put together something that would 
have been included in the official distro, as e.g. Blender.UI module (i 
think it would have been fine as a py wrapper over the old c stuff, 
althought i'm sure people would have also liked to get rid of some old 
nastyness in the Draw and Window modules). but again wishing and 
suggesting don't make things happen, and i guess i didn't have much 
interest in working there myself (have for long been quite uninterested 
in wimp guis. but that's just me being stupid :).

well, luckily 2.50 is AFAIK now coming up with the tool API etc. so we 
should finally get to good shape there. so i guess the point is that 
everyone who wants to get a nice ui api should pay attention to the work 
there, i think having written such an abstraction layer yourself you 
have very good base for critical review etc. of the coming 2.50 


More information about the Bf-committers mailing list