As promised to RickyBlender: This script is broken because a renaming of a function so here is the mini tutorial step by step:
We are going to fix this script: [system_test_script_to_fix.py](http://www.filefront.com/17803566/test.zip/)
Place the script in blender/2.56/scripts/addons
(or much better (the recommended way by blender developpers for scripts that don't ship with
blender and are not revised by them) in folder: blender/2.56/scripts/addons_contrib
creating such folder if you don't have it yet)
and open blender and go to File/User Preferences/Add-Ons/<b>System</b>
The addon don't even shows (in a recent blender build 34333).
What blender shows in addons is the content of a dictionary variable
"bl_addon_info" in the script, so something is wrong in this variable now.
Close User Preferences.
Change the 3DView to Text Editor and Text/Open and in blender/2.56/scripts/addons
open some script like for example the add_curve_aceous_galore.py and you can see
that <b>bl_addon_info</b> is now changed to <b>bl_info</b>.
Close this script: in the Text Editor Menu footer you see the script name and to the right a <b>+</b> and
a <b>x</b> button. Click the <b>x</b> one to close the script.
Open in Text editor in blender our script and change bl_addon_info to bl_info
and Text/Save to save the changes. Don't close the script yet.
Open User Preferences/Add-Ons/System and now you see "Test script to fix" addon.
You can't check the box to the right to enable the script. We need to look
the python terminal (not the python console in blender) to know what is happening.
In Windows you have already that python terminal opened.
In Linux you need restart blender from terminal. So if you are in Linux close blender and
open a terminal and navigate to where the blender executable is
(there is an addon for nautilus that adds an option to open a terminal on the folder you are
that is very useful if you didn't know)
and write:
./blender
and now you have the python terminal running too. Of course open the script in the text editor
too if you were in Linux.
Well, try to enable the add-on and look what is said in the python terminal:
It says system_test_script_to_fix.py line 20 ImportError: cannot import name LineIntersect
In the script, the line 20 is this:
from mathutils.geometry import LineIntersect
and this function name is now not found (because the name has changed).
To know what name it has now, in blender change the Text editor to Python Console.
Enter this text:
import mathutils (and return to import this module)
mathutils.geometry (and click two times the Autocomplete button, first time it adds a dot
and second it shows the functions in geometry module)
There is not a LineIntersect function so it was renamed, the one with a closer name is "intersect_line_line".
Go to Text editor where we have our script opened and we need to see line numbers. Choose in
the Text Editor menu View/Properties and click the Line Numbers button
In line 20 change:
from mathutils.geometry import LineIntersect
to:
from mathutils.geometry import intersect_line_line
In the properties panel you have a Find button. Enter LineIntersect and click Find
It finds in line 25:
a = LineIntersect(v[0],v[1],v[2],v[3])
that you must change to:
a = intersect_line_line(v[0],v[1],v[2],v[3])
Text/Save and X to unlink (close) the script. Change to 3DView.
In UserPreferences/Add-ons/System you can now enable at last the "Test script to fix" script. The script shows at the bottom of the N panel in the 3DView a button that calls the problematic function and then just returns without doing anything more.
Fixed.
I downloaded it and it is as I said: you must change lines 43, 60, 90 as commented in first post. I guess you are editing zeffii script not mine (it has the same name).
Because the bl_addon_info and changes to the name of API functions, the scripts that are broken will be forever at least you or someone do the changes I explain here.
I said in the Big Number Toolkit thread that I recommend don’t use the /scripts/addons folder.
Instead create an /scripts/addons_contrib folder and place there these scripts that don’t come with blender. So when you download another blender version you only have to copy the /addons_contrib folder there and you don’t touch anything inside /addons folder (these scripts are maintained by blender developpers)
I have a script that compiles and then adds this /addons_contrib folder. I just double click a link in the desktop and all is ready in around two minutes.
But the download of the source code with subversion I don’t do that with the script, I prefer enter and see in the subversion client what they changed.
In the Text Editor View/Properties (hotkey is Ctr+F to show that panel). In that panel there is the properties subpanel and the find subpanel below where you has the Find button.
Yes, you can download the pdf with all the API (just above that red rectangle is the link to the pdf) but you will see the old name LineIntersect yet.
In Blender 2.56 when you click Ctr+F it opens a panel to the left like the tool shelf in a 3DView. It is called Properties if you open it in the Menu of the Text Editor (View/Properties).
You talk about the API Navigator script that PKHG pointed you? Yes, I recommend it too. But I find using the python console a quicker way for things like I explained in first post of this thread.