[Bf-python] global dictionary

Stephen Swaney sswaney at swbell.net
Sat Aug 9 21:39:16 CEST 2003


Willian Padovani Germano wrote:

> [snippage]
>
> (Blender.ReleaseGlobalDict(bool)).  Yes, confirmed.  This was an early
> test, I've thought of a better method already and it should be in 2.29,
> I hope.

Thanks, Willian.  Useful info.

> It applies to all scripts until you toggle its state again.

This does not seem to apply to global scriptlinks.  I can run
my frameChanged script with Alt-P and it shows this behaviour.
Running it from the frameChanged scriptlink, it seems to be
'forgetful'.

In one of the blender python forums ( fora? ), someone suggested
adding a member to the Blender class to hold persistant info, similar
to what you propose below.  This seems to work with the scriptlinks.

> As I said, there will be.  The plan is this:
>
> Instead of using a fresh global dict everytime, we'll clean the current
> one of "almost" all stuff added to it after a script runs.
>
> The only thing this dict will keep besides what a fresh one has is a
> special dictionary.  We need a good name for it, but for now let's call
> it _Blended.

I like this idea!   Knowing about future direction makes it possible
to minimize porting efforts.  It also anticipates my question about having
scripts that only need local data.

On a separate topic:

Recently, at SIGGRAPH, there was a BOF session for blender users.
It was well attended, more people than were planned on.   Quite a
few people expressed interest in blender's import/export capabilites.
In addition to traditional animation users, there was someone from
NASA's Jet Propulsion Laboratory and guys from the U.S Marine
Corps and Navy who were doing simulation and visualization work
with blender.  Blender at NASA!  WOO WOO!

The new python implementation will make it possible
to write the necessary importers and exporters.  You guys have been
doing a very thorough job and deserve a collective pat on the back.
Many thanks.

Stephen

--
Stephen Swaney
sswaney at swbell.net






More information about the Bf-python mailing list