[Bf-committers] Integration of scripts in the UI

Ton Roosendaal bf-committers@blender.org
Thu, 4 Sep 2003 16:16:32 +0200


Hi,

One second is not bad... gimp does it all pretty much faster than  
photoshop does.

> Personally (and I confess that I say this as somebody who plans to
> do absolutely no work on the implementation) I vote 'overkill right  
> now'
> rather than 'growing pains in 6 months'.

My experience learnt me to always choose for the simplest monkeyest  
proof solution, which includes only requirements you really know you  
need. Growing pains always will happen, no matter how smart you think  
you can predict a future.
Using external tools or code also hardly ever proved to work. The  
amount of work then to get rid of it is even more painful.

And: I really cherish a quick Blender start as one of its original  
charms...

It wouldn't be too hard to devise a system for python UI stuff that  
builds dynamically, just like Images are not loaded until you invoke  
one? It can be in stages, like:

- build pulldown menu (based at directory structure, even script  
headers can be read)
- same for nested sub-menus, toolbox, etc
- only initialize (register) scripts when they're actually called

On the other hand, when the coders prefer to make something quick  
first, they can do it the simplest way they'd like, and solve problems  
with slow startup when we encounter it. Currently we're not thinking of  
more than a couple of dozen scripts to default include in Blender. if  
that takes less than half a second to parse, you won't even hear me!

-Ton-



On Wednesday, Sep 3, 2003, at 22:20 Europe/Amsterdam, Chris Want wrote:

>
>> Yes, this was suggested and is an interesting mechanism.  But it's  
>> kind of
>> expensive, since we'd have an Init() function in each script and  
>> would have
>> to run the Python interpreter for each available script when starting
>> Blender.  Who knows?  If we reach 100 or more scripts there (and I do
>> believe that this is possible -- I'll contribute at least 4 myself,  
>> soon,
>> and I'm not an avid script writer) the overhead can start becoming
>> noticeable.
>
> thinkatron{cwant}~$ ls /usr/lib/gimp/1.2/plug-ins | wc -l
>     245
>
> When gimp loads, the part of the initialization that says "Plugins"
> is under 1 second (the whole initialization is under 3 seconds),
> and it is going through 245 plugins written in C, scheme, perl
> and python (P3, 733MHz).
>
>> So *if we don't find* other uses to justify this mechanism, it may be  
>> a
>> little overkill right now.
>
> The other advantage is you don't have to reinvent the wheel: Blender
> is GPL and GIMP is GPL -- steal some code!
>
> Personally (and I confess that I say this as somebody who plans to
> do absolutely no work on the implementation) I vote 'overkill right  
> now'
> rather than 'growing pains in 6 months'.
>
> Chris
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org