For the last several days I've been thinking about how I would redesign Blender. Blender's Python interface pretty much sucks. It's hugely complicated and yet wimpy in essence. The main conclusions:
1. It would be Python program, not a C program. That is, all the C code would become Python extension modules. 2. It would use a standard as the windowing system (pyQt), presumably with a custom graphics window. This design would greatly reduce the amount of Blender-specific code, and would allow the developers to focus on Blender-specific issues. It would, in a completely natural way, make all aspects of Blender accessible via Python, just as in Leo. Clearly, such a thing would be a hard sell :-) However, this train of thought has gotten me re-energized. The new direction is to discover how to integrate existing open source projects so that each can focus on what it does best. This has been tried before, in many different contexts. Nevertheless, it is still intriguing. Whatever the merits of these thoughts, they have immediate effect for Leo: I now see what I am doing as "combining" programs. That is, the "basic materials" are existing programs (or libraries), not individual Python statements. Two new projects immediately present themselves: 1. Build Blender-like windows into Leo. That is: A. Create a Blender-like interface for splitting and joining Leo windows. B. Create a framework for creating new *types* of Leo windows. 2. The first new type (or types) of Leo window would be debugger windows. At minimum, we want a window for debugging code: that is, for setting breakpoints, highlighting the presently-selected code line. Like pudb or any of the other gui-based debuggers. Yesterday I looked at all the gui-related code in in winpdb. It would be straightforward to convert it all to pyQt. We could put the code into Leo. BTW, there are many complications in winpdb related to remote debugging. As a first draft, we can ignore all that "stuff" and concentrate on local debugging. Otoh, the complex inter-process communication code in winpdb might be worth serious study. The motivation to do this study is one reason why the new direction is so exciting. I love studying code. Having an "excuse" to do it is great :-) Another project might be some kind of prototype that would demonstrate the advantages of basing Blender on Python instead of C. This is most likely a fantasy. I've looked at enough of the Blender Python- interface code to know that is is a major engineering project. However, there are tools to help build C extensions: pyrex and swig come to mind. Maybe we could create some more... In short, I am thinking at a different granularity. Most of my early thoughts will be naive, but isn't that the characteristic of "beginners mind"? Anyway, I haven't been this excited about programming and design for a long time. To paraphrase Hokusai, I am an old man, mad about programming. I welcome your ideas for new projects at this new level of granularity. Edward P.S. Another project is to create some better links between Leo and IPython, although perhaps all the needed links are already present... P.P.S. Another direction would be to create links between Leo and zodb, or couchDB, or the sentences model: http://www.sentences.com/sentences.htm P.P.S. Rather than redesign Blender, the new direction provides some incentive for redesigning Leo, or at least the ugliest parts of it... EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
