L-System/Linux and Blender 2.28a

Hi, a relatively new blender script user here, long time (hobbyist) python programmer. I was wondering if anyone could give me advice as to why L-System (the blender 2.28 version) doesn’t seem to work on my system.

I’ve set PYTHONPATH to what
import sys
sys.path
reports in my python distribution.

The blender 2.28a version I have on my machine was built from source on a Mandrake 9.1 system.

But when I try to run the application script, it gives me the application window, then chucks a hissyfit when I press “Generate”. Tried disabling leaves (this was a problem reported with some versions of L-system).

When run from a bash shell, I get the message that l-system.py can’t access the four-dimensional identity matrix out of Matrix.py
Which is just plain WIERD if you ask me.

l-system.py has this line in it’s data:

import * from Matrix

and later it applies the four-dimensional identity matrix function (which is defined by a simple def statement in Matrix). That I understand, and doing this in a normal python shell returns the four-dimensional identity matrix function. [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]

What I don’t understand is why this doesn’t work inside blender 2.28a.

If anyone has any advice, it would be greatly appreciated.

AncientHart

PS: I’ve also tried detabifying each file using idle, and removing file-system versions of the scripts after wrapping the new files into a blend file. This had no effect.

You should go to jim solers site. http://jmsoler.free.fr/util/blenderfile/images/lsystem/lsystem.htm


and then maybe my tutorial:
www.zaug.netmegs.com/l.html

Zaug

I had the same problem with you…

There is nothing wrong with the script…

There is a chance that you’ve got some conflicting modules in your official Python installation… At least that was the case for me…

The script is trying to use functions and methods from the wrong place, instead of importing them from the lsystem.py, Matrix.py, etc. files, that are shiped along with the Lsystem script…

I don’t remember well, but I think my problem was that I had the official Lsystem Python Module installed in /usr/lib/python2.2/site-packages…

Try to find out which modules are, that cause the problem and try to remove them from your $PYTHONPATH and your problem will be solved…

I hope this helps…

Uuumm. Let me check. There’s the possibility that I placed an older version into the system location.

I’ll get back to you, Thank you.

O.k. :smiley:

Let me know if you had any progress with it, cause I’m really curious… :smiley:

C. U.

Ah-hah. Found the problem and it wasn’t my fault (Honestly!!! :slight_smile: ). Following your suggestion, I did a file search for a Matrix.py in my default python install, and found it … under the Numeric package directory.

Since Numeric has been on my system longer than L-system, I decided to fix the problem by renaming the Matrix.py file in the L-system blend to lMatrix, and adjusted the “from Matrix import *” line in the lsytem file accordingly. Saved the blend file down, ran the program and it worked perfectly.

:-? No wonder it couldn’t find the 4D identity matrix function under Matrix!

Thank you for your help Timonides. Now I just have to get the source for 2.28c (Using university machines and can’t install CVS utils) and everything will be perfect.