[Bf-committers] Wrapping the error function. - UI Python macros.

Martin Poirier theeth at yahoo.com
Wed Nov 24 01:29:52 CET 2004


This is something that have been slowly going on in
the past release. Separation of functionality and
interface is always a good thing.
I don't agree that the menu part should be in space.c
though. This would generate lots of "noise" for
nothing. Instead, (and, correct me if I'm wrong, but
this is what has been done with those that have been
split already), it would be better to create a
join_menu() function giving a menu, calling the join
functionality function and then redrawing if needed.

This is something that had to be done when adding
functionality to the dropdown menus (no need for
double confirmation) and yes, it would make wrapping
in Python easier (and also generally cleaning up the
codebase).

Martin


--- Campbell J Barton <cbarton at metavr.com> wrote:

> Im not sure if this is possible but the other day I
> was looking at 
> making blender functions into Python callable macro
> like functions - 
> join, apply-size/rot, dupeLinked etc.
> 
> 
> Im trying to figure out a way of efficiently
> wrapping these.
> I can seperate these into foo_bar and foo_bar_ui as
> discussed at BConf, 
> but this still involves replicating some code.
> 
> One issue is that manu of these functions use
> confirmation menus
> The python wrapping would be heaps easier if all
> confirmation menus and 
> redraws were moved into the GUI code that called
> them.  - space.c
> 
> 
> if menu(do you want to Join?) {
> Join()
> redraw()
> }
> 
> rather then calling join and then it handle the UI
> stuff as done now.
> 
> Also- it would be good to be able to wrap blenders
> error function so 
> Blender could raise it as a python error OR a ui
> error.
> This would remove quite a lot of work in replicating
> error messages for 
> python and blender.
> 
> What do you think?
> - Cam
>  
> 
> 
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
>
http://projects.blender.org/mailman/listinfo/bf-committers
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list