RAISON D’ETRE:
let’s be clear.
the download you took was a demo for a class in the module explosion.py
a class is not a script as you understand it. This is not intended to be
used as a script and as I said I was screwing about with the limits
of the API as such persistence etc (see criticism below).
The Blender guys give you this stoopid module Registry
that you don’t need, they give you a few hints and
then leave you up s*** creek…to figure out what best practice is.
So the intended audience is other developpers whoever they
might be (do they exist ) and I want to figure out what best
practice is for keeping the mesh deformation data.
ANSWER to your question:
Sure you can add a mesh, select it, save Blender, quit, reload
then alt-A will explode your mesh. Don’t complain – I still
to ctrl-W before I edit a mesh because I haven’t got used
to having an undo yet.
on the other hand there is an unzipped .blend at the same URL
merely selecting another mesh and doing alt-A does what you
want (unfortunately I didn’t have the time to write the clean up
code so every time you do this this adds essentially 2 copies
of the selected mesh).
The effect is still quite unnatural tell me what you like and
I might make a proper end user script. For example
a) I don’t think square faces are natural and in any case should
be smaller/more random
b) maybe the big pieces should be extruded at the edges.
c) maybe the big pieces should be individual objects with IPOs
d) I thought about adding clouds and a flash but the
API won’t let me access the texture mappings so…
BTW I disagree with you about this being the worst example
of open source. I wrote minimal demo code
because I didn’t want all those nested if’s that you have to do
to check the user hasn’t done something incredibly stoopid.
I was sure this would p*** some people off
What p***es me off is that I have been hanging
about this forum for over a year and in all that time.
1/ the API is flakier than ever (see my other posts on
Effects, Scenes, and key IPOs over on blender.org)
You can’t even access texture mappings.
The doc is wrong/largely incomplete in places e.g.
http://www.blender.org/modules/documentation/236PythonDoc/Object.Object-class.html#copyAllPropertiesTo
what does this do?
2/ I use Python a lot (mySQL, PIL, webcrawling, google,CGI)
and have a collection of useful modules and ‘stolen code’
from other people. As yet I have not stolen a single
line (well actually I stole 4 from JMS) on this forum
3/ at Blender.org the code snippets consists of 5 functions
one of which I rewrote cutting it from >250 lines to <110.
This all really hurts if you have a deadline and want
to modify something to order (I know form experience).
When I did ActionScript a quick google search and
usually you found something close enough.
It was often written as a class, which you subclassed,
overrode/added methods etc, like in the explodeMe.py