Why can't I get any Python Scripts to run on Blender 2.4???

Everything I try to run gives me an error. I’m new to running scripts though so it could be something that I just don’t know to do.

Do you have Python 2.4 installed? If you do then we would need to see the Error message from the Console.

(Re. Explode.py; jms’s site is still down and I’ve contacted him about it).

%<

Do you think that script (explode) would work on the older version of Blender? and if so, is there a way that I could have both versions and choose which one I wanted to run? (windows xp)

Everything I try to run gives me an error.

Whatever you do, DO NOT look at the console for error messages and DO NOT tell us what they say.

Yes, it may be dependant on Python 2.3.x (Blender 2.28 to 2.36), and as stiv said, whatever you do don’t look at that console!

%<

Okay, my fault, here are my exact steps and the exact error message:

  1. open blender and kill the default mesh
  2. add a uv sphere and switch to object mode
  3. change one window to the text editor and open “scriptlink.py”
  4. With the uv sphere selected (pink) I hit alt p in text widow and I get an error that says check the console.
    The console says:

"IndexError: list index out of range
Traceback (most recent call last):
File “explode3.py”, line 99, in ?

(it says this like a million times)
<then>

IndexError: list index out of range
Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender.blender\scripts\scriptlink.py”, line 9 in ?
MESH3d.addScriptLink(NAME,EVENT)
AttributeError: no such Blender Text

Here is the script for the “Scriptlink.py”:
import Blender
EVENT=‘FrameChanged’
NAME=‘explode4.py’
MESH3D = Blender.Object.GetSelected()[0]
scriptlink=MESH3D.getScriptLinks(EVENT)
if scriptlink and NAME in scriptlink:
pass
else:
MESH3D.addScriptLink(NAME,EVENT)
Blender.Redraw()

So, then I tried what you told me earlier about the window buttons and I go to the Script button, and “Enable Script Links” is already selected (dark green). at the bottom of that window it says "Scene Script link [0 scr: 0] with a button that says “New”.
I clicked the New button and selected scriptlink.py from the list.
I go back to the text editor and alt p but I get the same message about checking the console, the next to the last line of the script is highlighted red and the console reads exactly as above again.

Okay, where am I jacking it up??
[/img]

You need to have all the scripts loaded (Text, Scriptlink4.py, Explode4b.py and Explode4.py), you then select the object to explode and change the name as instructed in the page I linked to, Alt-P on Scriptlink.py to initialize it before moving it to the scriptlink. If an Empty for the floor hasn’t been added you have to add it and name it correctly.
Then you Alt-P on Explode4b.py.
The “List Index Out of Range” means you either don’t have a mesh selected or the mesh you have selected is not the one that the script is looking for, which is the most likely of the 2.

I can’t give you any better instructions than the page I linked to on jms’s site.

%<

I’m getting really close.
I added an empty and named it “SOL” then went ahead several frames, alt p on the scriptlink4.py, nothing happened. I think the script was supposed to automatically create a mesh named “exploded_mesh” and another one named “reference_mesh” or something like that but I didn’t see that happen. I went back to frame 1 and alt p on the explode4.py and it gave me this error:

AttributeError: Unknown object specified

This line of the script was highlighted:

MESHR = Blender.Object.Get(‘reference’).getData()

AttributeError: Unknown object specified

This line of the script was highlighted:

MESHR = Blender.Object.Get(‘reference’).getData()

This means there is no object named ‘reference’. Object.Get() throws an exception if you ask for something by name and can’t find it.

According to the directions, the script was supposed to create that mesh itself automatically.

HEY! I GOT IT! (sort of)

Now, the mesh explodes but there doesn’t seem to be any gravity in it. If anything, the whole thing seems to move backwards along the Y axis until it sort of hits an imaginary wall. I did add an empty and named it “SOL” like the directions said but that doesn’t seem to effect anything. Any ideas?