Blender CAM

cgmystic, thanks for response.
I need to make another tutorial about Blender CAM, I think the locking of your PC might be because of sizes - always keep in mind that 1 blender unit= 1 meter, so try models at real world sizes…

Hello, I just uploaded a little update with some fixes and features on the blog:

hi!

i have some problems to activate the addon here, i call blender from the console and i try to activate the addon from the preferences pannel, the addon refuses to be activated and the message in the console is:


Traceback (most recent call last):
File “/home/jano/blender/2.64/scripts/modules/addon_utils.py”, line 264, in enable
mod = import(module_name)
File “/home/jano/blender/2.64/scripts/addons/cam/init.py”, line 29, in <module>
from bpy.types import Menu, Operator, UIList
ImportError: cannot import name UIList


how i can solve this? any ideas about this ‘UIList’? is this the rigth place to ask?
Thanks!

jano2358: are you using the correct version of blender? it should be 2.66a with the newest version. This is not an error here.
What OS are you on?

hi!

first i tryed with the 2.64, now i just put the 2.66a, the result is quite similar, i activate the ‘simplify curves’ addon and when i try to activate the CAM he refuses and in the console i have the next message:

jano@jano-Mac:~/blender$ ./blender
connect failed: No such file or directory
found bundled python: /home/jano/blender/2.66/python
Traceback (most recent call last):
File “/home/jano/blender/2.66/scripts/modules/addon_utils.py”, line 269, in enable
mod = import(module_name)
File “/home/jano/blender/2.66/scripts/addons/cam/init.py”, line 30, in <module>
from . import utils, exporters
ImportError: cannot import name utils

seems as if he lacked the utils module

i put this blender under linux, this is the result of uname -a:
Linux jano-Mac 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

i have python 2 and python 3 at the same time, i hope they don’t fight, the result of python3 --version is: Python 3.2.3

i’m not sure about the other libraries numpy and poligons, this is the content of blender/2.66/scripts/modules:

-rw-r–r-- 1 jano jano 12743 mar 5 17:33 addon_utils.py
-rw-r–r-- 1 jano jano 47130 mar 5 17:33 animsys_refactor.py
-rwxr-xr-x 1 jano jano 2779 mar 5 17:33 blend_render_info.py
drwxr-xr-x 2 jano jano 4096 mar 5 17:54 bl_i18n_utils
drwxr-xr-x 3 jano jano 4096 abr 20 15:52 bpy
drwxr-xr-x 3 jano jano 4096 abr 20 15:52 bpy_extras
-rw-r–r-- 1 jano jano 7002 mar 5 17:33 bpyml.py
-rw-r–r-- 1 jano jano 3264 mar 5 17:33 bpyml_ui.py
-rw-r–r-- 1 jano jano 1732 mar 5 17:33 bpy_restrict_state.py
-rw-r–r-- 1 jano jano 22201 mar 5 17:33 bpy_types.py
drwxr-xr-x 2 jano jano 4096 mar 5 17:54 console
-rw-r–r-- 1 jano jano 10405 mar 5 17:33 console_python.py
-rw-r–r-- 1 jano jano 1974 mar 5 17:33 console_shell.py
-rw-r–r-- 1 jano jano 6370 mar 5 17:33 graphviz_export.py
-rw-r–r-- 1 jano jano 6401 mar 5 17:33 keyingsets_utils.py
drwxr-xr-x 16 jano jano 4096 abr 20 15:49 numpy
-rw-r–r-- 1 jano jano 1658 abr 20 15:49 numpy-1.6.1.egg-info
drwxr-xr-x 3 jano jano 4096 abr 20 15:50 Polygon
-rw-r–r-- 1 jano jano 2665 abr 20 15:50 Polygon-3.0.5.egg-info
drwxrwxr-x 2 jano jano 4096 abr 20 15:52 pycache
-rw-r–r-- 1 jano jano 21485 mar 5 17:33 rna_info.py
-rw-r–r-- 1 jano jano 4854 mar 5 17:33 rna_prop_ui.py
-rw-r–r-- 1 jano jano 14054 mar 5 17:33 rna_xml.py
-rw-r–r-- 1 jano jano 4440 mar 5 17:33 sys_info.py

and the folder numpy:

total 320
-rw-r–r-- 1 jano jano 192537 abr 20 15:49 add_newdocs.py
drwxr-xr-x 2 jano jano 4096 abr 20 15:49 compat
-rw-r–r-- 1 jano jano 1254 abr 20 15:49 config.py
drwxr-xr-x 5 jano jano 4096 abr 20 15:49 core
-rw-r–r-- 1 jano jano 13881 abr 20 15:49 ctypeslib.py
drwxr-xr-x 6 jano jano 4096 abr 20 15:49 distutils
-rw-r–r-- 1 jano jano 1783 abr 20 15:49 dual.py
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 f2py
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 fft
-rw-r–r-- 1 jano jano 12888 abr 20 15:49 _import_tools.py
-rw-r–r-- 1 jano jano 5008 abr 20 15:49 init.py
drwxr-xr-x 4 jano jano 4096 abr 20 15:49 lib
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 linalg
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 ma
-rw-r–r-- 1 jano jano 9494 abr 20 15:49 matlib.py
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 matrixlib
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 numarray
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 oldnumeric
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 polynomial
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 random
-rw-r–r-- 1 jano jano 946 abr 20 15:49 setup.py
-rw-r–r-- 1 jano jano 1486 abr 20 15:49 setupscons.py
drwxr-xr-x 3 jano jano 4096 abr 20 15:49 testing
-rw-r–r-- 1 jano jano 228 abr 20 15:49 version.py

(lot of folders inside, i will not list them all), and the contents of the fodler Poligon:

total 236
-rwxr-xr-x 1 jano jano 203940 abr 20 15:50 cPolygon.cpython-32mu.so
-rw-r–r-- 1 jano jano 819 abr 20 15:50 init.py
-rw-r–r-- 1 jano jano 12043 abr 20 15:50 IO.py
drwxr-xr-x 2 jano jano 4096 abr 20 15:53 pycache
-rw-r–r-- 1 jano jano 2487 abr 20 15:50 Shapes.py
-rw-r–r-- 1 jano jano 11579 abr 20 15:50 Utils.py

any clues? Thanks!

jano,

so, you have a mac with an ubuntu too?
well I just uploaded a mac version, hope it works since I can’t test properly.
For linux, you have to compile the libraries, and copy them to you blender installation.
But they belong to blender/2.66/python/lib/ folder, not to the modules folder.
The cam folder belongs to addons folder.
if you make it running, let me know :wink: Nobody else reported having it working on linux.

i get tired about the macos long time ago, so i can’t try your mac version, still trying with linux…

inside the cam/init.py the line 30 says ‘from . import utils, exporters’, and the Traceback says they can find any utils, so they can’t find the ‘.’ ?
after i copy the utils.py adn exporters.py to the addons folder, they can find the utils and exporters, but this repeats endless on the console:


fake_module: addon missing ‘bl_info’ gives bad performance!: ‘/home/jano/blender/2.66/scripts/addons/exporters.py’
fake_module: addon missing ‘bl_info’ gives bad performance!: ‘/home/jano/blender/2.66/scripts/addons/utils.py’


i know nothing about python, what is ‘bl_info’? should I don’t copy the utils.py or exporters.py to addons?

Hello, well all the cam addon files should be in the cam folder - so its 2.66/scripts/addons/cam/utils.py e.t.c.
But did you compile polygon and numpy libraries, or get their binary packages?
from what you posted it is not clear to me…

hi!

last time i took the binaries from synaptic, today i compiled the numpy and poligon, but the result was the same:


jano@jano-Mac:~/blender$ ./blender
connect failed: No such file or directory

Note: No (valid) ‘/home/jano/.config/blender/2.66/config/startup.blend’ found, fall back to built-in default.

Read new prefs: /home/jano/.config/blender/2.66/config/userpref.blend
found bundled python: /home/jano/blender/2.66/python
Traceback (most recent call last):
File “/home/jano/blender/2.66/scripts/modules/addon_utils.py”, line 269, in enable
mod = import(module_name)
File “/home/jano/blender/2.66/scripts/addons/cam/init.py”, line 30, in <module>
from . import utils, exporters
ImportError: cannot import name utils

Blender quit


but, the python in ubuntu is python3.2 and the python under the blender folder is 3.3, is this a problem? because the files now are under /home/jano/blender/2.66/python/lib/python3.2/site-packages ,and under /home/jano/blender/2.66/python/lib there is a python3.3 with other things too

the script never reach the point to import numpy or poligon (is on the line 31), he stops on the utils request, are u sure this is normal?
Thanks!

Hello, so you have the cam addon in the cam folder?
You definitely have to have Python 3.3, 3.2 won’t work.

Please read the instructions here:

hi!

i upgraded all, previously was ubuntu12.04, now i have the 12.10 and python3.3
i compiled again poligon and numpy with python3.3
and the result is the same, they can’t find utils:
jano@jano-Mac:~/blender$ ./blender
connect failed: No such file or directory
found bundled python: /home/jano/blender/2.66/python
trying to save userpref at /home/jano/.config/blender/2.66/config/userpref.blend ok
Traceback (most recent call last):
File “/home/jano/blender/2.66/scripts/modules/addon_utils.py”, line 269, in enable
mod = import(module_name)
File “/home/jano/blender/2.66/scripts/addons/cam/init.py”, line 30, in <module>
from . import utils, exporters
ImportError: cannot import name utils

Blender quit

jano 2385, and can you import numpy or Polygon if you type it in the console in blender?

switch to python console in blender,
type:
import Polygon
import numpy

and see if you get any errors. If the utils module is in the cam folder, it should find it, as it does on windows and Mac.

Yes!! now is working! (at least it can start)
the last necessary step was move the numpy and polygon to the ‘right’ place, i mean: i compiled the libraries with the --prefix /home/jano/blender/2.66/python and the script put the files under /home/jano/blender/2.66/python/lib/python3.3/site-packages and i move them to /home/jano/blender/2.66/python/lib/python3.3/
after this the cam module is loaded, now i need to learn to use it!
Thanks for the patience!! now is reported: it works on ubuntu 12.10 :yes:

jano2358: that is great news :slight_smile: maybe if you can simply pack the working build and send it to me somehow, I can put it on my webpage for linux users.

@jano
Could you be so kind to post the output of cat /path/to/numpy/init.py

Every time i go for import numpy in the python console i get a git_revision error and numpy can´ t load it´ s modules in his own folder?!?

hi!

the file is packed, i sent you a PM pildanovak

elrippo:
this is the init.py:

jano@jano-Mac:~$ cat blender/2.66/python/lib/python3.3/numpy/init.py
“”"
NumPy

Provides

  1. An array object of arbitrary homogeneous items
  2. Fast mathematical operations over arrays
  3. Linear Algebra, Fourier Transforms, Random Number Generation

How to use the documentation

Documentation is available in two forms: docstrings provided
with the code, and a loose standing reference guide, available from
the NumPy homepage <http://www.scipy.org>_.

We recommend exploring the docstrings using
IPython <http://ipython.scipy.org>_, an advanced Python shell with
TAB-completion and introspection capabilities. See below for further
instructions.

The docstring examples assume that numpy has been imported as np::

>>> import numpy as np

Code snippets are indicated by three greater-than signs::

>>> x = 42
>>> x = x + 1

Use the built-in help function to view a function’s docstring::

help(np.sort)
… # doctest: +SKIP

For some objects, np.info(obj) may provide additional help. This is
particularly true if you see the line “Help on ufunc object:” at the top
of the help() page. Ufuncs are implemented in C, not Python, for speed.
The native Python help() does not know how to view their help, but our
np.info() function does.

To search for documents containing a keyword, do::

np.lookfor(‘keyword’)
… # doctest: +SKIP

General-purpose documents like a glossary and help on the basic concepts
of numpy are available under the doc sub-module::

from numpy import doc
help(doc)
… # doctest: +SKIP

Available subpackages

doc
Topical documentation on broadcasting, indexing, etc.
lib
Basic functions used by several sub-packages.
random
Core Random Tools
linalg
Core Linear Algebra Tools
fft
Core FFT routines
polynomial
Polynomial tools
testing
Numpy testing tools
f2py
Fortran to Python Interface Generator.
distutils
Enhancements to distutils with support for
Fortran compilers support and more.

Utilities

test
Run numpy unittests
show_config
Show numpy build configuration
dual
Overwrite certain functions with high-performance Scipy tools
matlib
Make everything matrices.
version
Numpy version string

Viewing documentation using IPython

Start IPython with the NumPy profile (ipython -p numpy), which will
import numpy under the alias np. Then, use the cpaste command to
paste examples into the shell. To see which functions are available in
numpy, type np.<TAB> (where <TAB> refers to the TAB key), or use
np.*cos*?<ENTER> (where <ENTER> refers to the ENTER key) to narrow
down the list. To view the docstring for a function, use
np.cos?<ENTER> (to view the docstring) and np.cos??<ENTER> (to view
the source code).

Copies vs. in-place operation

Most of the functions in numpy return a copy of the array argument
(e.g., np.sort). In-place versions of these functions are often
available as array methods, i.e. x = np.array([1,2,3]); x.sort().
Exceptions to this rule are documented.

“”"

We first need to detect if we’re being called as part of the numpy setup

procedure itself in a reliable manner.

try:
NUMPY_SETUP
except NameError:
NUMPY_SETUP = False

if NUMPY_SETUP:
import sys as _sys
_sys.stderr.write('Running from numpy source directory.
')
del _sys
else:
try:
from numpy.config import show as show_config
except ImportError:
msg = “”“Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python intepreter from there.”“”
raise ImportError(msg)
from .version import git_revision as git_revision
from .version import version as version

from ._import_tools import PackageLoader


def pkgload(*packages, **options):
    loader = PackageLoader(infunc=True)
    return loader(*packages, **options)


from . import add_newdocs
__all__ = ['add_newdocs']


pkgload.__doc__ = PackageLoader.__call__.__doc__


from .testing import Tester
test = Tester().test
bench = Tester().bench


from . import core
from .core import *
from . import compat
from . import lib
from .lib import *
from . import linalg
from . import fft
from . import polynomial
from . import random
from . import ctypeslib
from . import ma
from . import matrixlib as _mat
from .matrixlib import *


# Make these accessible from numpy name-space
#  but not imported in from numpy import *
from builtins import bool, int, int, float, complex, \
     object, str, str
from .core import round, abs, max, min


__all__.extend(['__version__', 'pkgload', 'PackageLoader',
           'show_config'])
__all__.extend(core.__all__)
__all__.extend(_mat.__all__)
__all__.extend(lib.__all__)
__all__.extend(['linalg', 'fft', 'random', 'ctypeslib', 'ma'])


# Filter annoying Cython warnings that serve no good purpose.
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")

jano@jano-Mac:~$

@Jano
Thank you. Yesterday i was trying to compile numpy and Polygon. Numpy was not the issue to compile but Polygon and it´ s Versions gave me a headake :confused:
I tried it on 12.04 64bit and 13.04 64bit without success…
Which architecture did you compile?

Which Version of Numpy did you use? Which Version of Polygon did you compile?
I couldn´t get rid of the errors with numpy so i am very curious about your compiled version :smiley:

@pildanovak
When is the Linuxversion online, can´t wait to get my hands on it :smiley:

hi!

i run it on lubuntu 12.10, this the result of uname -a: Linux jano-Mac 3.5.0-27-generic #46-Ubuntu SMP Mon Mar 25 19:58:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
python is Python 3.3.0, numpy is 1.7.0 and Polygon is 3.0.5
i have no issues to compile the libraries, with Poligon you should use the setup.py script with your blender folder as --prefix argument, in my case the order was: python3.3 setup.py install --prefix /home/jano/blender/2.66/python
for numpy you have that menu, with the option 2 you can set the folder
after this i move the files from the ~/blender/2.66/python/lib/python3.3/site-packages to ~/blender/2.66/python/lib/python3.3/ , just one level up and then i was able to import the libraries in blender’s python console

i have the whole folder packaged here (if you or somebody else) want to download: https://dl.dropboxusercontent.com/s/b93dj5pkhoerxc3/blender.tar.gz?token_hash=AAFMg4XlwpykEEkmA54UeNlfzpJ1z6TiVRwApxBmkm3DgA&dl=1

Hy jano.

Currently i am running on Kubuntu 12.04.02LTS_64bit.
I have another HDD with a fresh Kubunt 13.04_64bit, where i will try to compile Polygon3-3.0.6 or Polygon-3.0.5

The interesting thing is, that when i compile numpy 1.7.0 or higher, my init.py looks completely different as the one you posted and i can not get rid of errors when i am at blenders python console typing “import numpy”.
Maybe, i do not know Python either, it’s the Python 3.2 that is compiling and building systemwide paths instead of relativ paths in the Python3.3 folder… hmmm… In about an hour we will know.

Your downloadlink seems to be broken… The archivmanager counts 1.2GB in your tar.file :slight_smile:

I just have to calculate some things and then i will change the HDD and getting involved :smiley:

Hy jano, hy pildanovak.

@jano: Thank you for kicking me in the right direction :smiley:
@pildanovak: If you need some testing on K/Ubuntu just give me a call :wink:

I learned a lot about python the last days. So here we are :slight_smile:

I compiled Blender-2.66a-linux-glibc211-x86_64 with numpy-1.7.0 and Polygon-3.0.5. The new 0.23cam extension and the folder /config is added.
The subdirectories /scripts/presets/cam_* are also ported.
It´s working fine. The interesting thing is, that it works on a 32bit and 64bit architecture under Ubuntu and Kubuntu.

I can confirm, that it runs under

1.) Ubuntu 10.04.04LTS_32bit with Kernel
Linux 2.6.32-46-generic #108-Ubuntu SMP Thu Apr 11 15:55:01 UTC 2013 i686 GNU/Linux

2.) Ubuntu and Kubuntu 12.04.2LTS_64bit with Kernel
Linux 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

3.) Kubuntu and Ubuntu 13.04_64bit with Kernel
Linux 3.8.0-19-generic#29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64GNU/Linux
with a small workaround.
A shared libary is needed -> http://www.blender.org/forum/viewtopic.php?t=25528&sid=12571109d15e1f48b9adb73723942ad6

After “sudo make install” the libaries are installed at “/usr/local/lib”. A softlink solves this problem “sudo ln -s /usr/local/lib/libSDL* /usr/lib”. If you want, you can also move them there “sudo mv /usr/local/lib/libSDL* /usr/lib”.

If you want to download the freschly compiled Version, here is the link to my Homepage :slight_smile:
https://elrippoisland.net/public/blender-2.66a-linux-glibc211-x86_64_CAM.tar.gz

Have fun with it :smiley: