[Bf-committers] Global undo & running python scripts
Jonathan Merritt
j.merritt at pgrad.unimelb.edu.au
Tue Feb 1 14:33:28 CET 2005
Hi joeedh,
joeedh wrote:
>> <... snip to save bandwidth ...>
>
> I proposed something very similar to this last year. My frustration
> with bpython's ability to produce real "plugins" lead me to write the
> (very simple) OnSave scriptlink, and eventually to a version of your
> idea.
> Anyway, I think your idea is better then mine, and you seemed to have
> developed it into a more logical fashion.
>
> joeedh
Thanks. :-) My suggestions are based mostly on the problems I had in
setting up the simple system of:
1. Start the script.
2. User selects an object.
3. The script responds.
The "standard" model for this in the past seems to have been:
1. Start the script.
2. User selects an object.
3. User clicks a button in the script to tell it that an object has
been selected.
4. The script responds.
The second model is fine for a one-off event that modifies an object, or
something like that, but in my script I was matching up image markers
with empties in a scene. Hence, my script had to be dynamically
interactive.
I think there's a very clear difference between "interactive" scripts
and "run-once" scripts. The interactive scripts rely on a rich set of
information to be passed from Blender regarding all manner of changes
that may take place outside of the script and inside Blender's internal
state. Using a scriptlink is really not completely adequate, since:
a) users can see script links that have been put in place, and can
remove them while a script is running!,
b) script links do not allow scripts to respond in different ways
depending upon the event that the script is responding to.
Maybe other people who have been working on interactive scripts could
comment here?
--
Jonathan Merritt BE(Mech)/BSc
PhD Student - Equine Biomechanics
The University of Melbourne
Veterinary Clinical Centre, Werribee
More information about the Bf-committers
mailing list