This problem is caused by the layout of the scripts directory which
prevents scripts from importing functions from any of the standard
Blender scripts. I've modified one of my scripts with a workaround which
I've shown as a patch below. Hopefully this will help someone fix this
issue in the Blender package. The problem is that import is expecting
the scripts to be in /usr/share/blender/scripts/ not
/usr/share/blender/scripts/blender/ - that extra subdirectory causes the
problem. Moving the scripts up a directory fixes all the standard
scripts.

--- a/primstar/uv_tools.py
+++ b/primstar/uv_tools.py
@@ -41,7 +41,14 @@ except:
 
 import Blender
 from math import atan2, pi, sin
-from uvcalc_follow_active_coords import extend
+try:
+    from uvcalc_follow_active_coords import extend
+except ImportError:
+    try:
+        from blender.uvcalc_follow_active_coords import extend
+    except ImportError:
+        print """Debian and Ubuntu users should run 'sudo
touch /usr/share/blender/scripts/blender/__init__.py' to allow import of
Blender scripts"""
+        raise

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/244787

Title:
  Can't run Blender scripts

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to