L-system script

I’m trying to use a python script called L-system to make trees in Blender 2.28.
When I run the script and hit ‘generate’ nothing happens.
The little window with blender says this:

Traceback (most recent call last):
File “lsystem.py”, line 6, in ?
ImportError: No module named random
failed importing internal module lsystem
trying to import external module…
Traceback (most recent call last):
File “Application.py”, line 447, in bevent
NameError: There is no variable named ‘lsystem_build’

What does this mean? Can I fix it? If not, does anyone know of any other python scripts to make trees?

Leslie

What version of Blender are you using?

I think you need to use 2.28 or lower for it to work. Possibly 2.25 even.

BgDM

Look under the python script effort at the top of this forum and find the script for lsystem that has been updated for 2.28 by jms.
Paradox

I think the problem is quite simple. ‘random’ is a python module which doesn’t ship by default with Blender. If you do a full python install (see http://www.python.org), you’ll be able to run the script further.

I did dowload the L-system from the thread in this forum, it should be compatible with 2.28. I have python 2.2, could that be it? Is the ‘random’ thing different from the python package?

Leslie

I have python 2.2 which is what you are supposed to use with Blender2.28c-2.3. Lsystem works fine for me, so I don’t think that’s it.

Did you run the script from the Application.py?

(tested with blender2.3 and python2.2 on win32 system, no problem)

Plugin compatability issues are why i keep 6 versions of Blender on my machine. That and my computer is just stupid like that.

What is application.py? I can’t even find this on my machine.

wait a sec…yes I did run it from application.py.

I did dowload the L-system from the thread in this forum, it should be compatible with 2.28. I have python 2.2, could that be it? Is the ‘random’ thing different from the python package?

‘Random’ is in Python 2.2 so if you say you have 2.2 installed then blender (actually LSystem) can’t find it. Check you’ve set your pythonpath correctly.

%<

there’s a tree generator called TReal, link is on my homepage. it exports to POV-Ray, but you can import it to Blender with my pyscript (also on my site, -> extras). generates realistic high-vert-count trees

pat