1
$\begingroup$

From the commandline documentation, activating an addon should be:
$: blender --addons <list of addons to activate>

But I can't seem to find the right syntax. Example with the STL import/export:

$: blender -b --addons io_mesh_stl
Exception in module register(): '/usr/share/blender/scripts/addons/io_mesh_stl/__init__.py'
Traceback (most recent call last):
  File "/usr/share/blender/scripts/modules/addon_utils.py", line 312, in enable
  mod.register()
  File "/usr/share/blender/scripts/addons/io_mesh_stl/__init__.py", line 260, in register
bpy.utils.register_module(__name__)
  File "/usr/share/blender/scripts/modules/bpy/utils.py", line 609, in register_module
    raise Exception("register_module(%r): defines no classes" % module)
Exception: register_module('io_mesh_stl'): defines no classes
$\endgroup$
2
  • $\begingroup$ @zeffi: Ho thx. Didn't expect that. You're right. Side note, I'm not well versed with Stack habits. In this case, should I delete the question, update it or what else? $\endgroup$
    – xuv
    Commented Feb 4, 2016 at 20:57
  • $\begingroup$ don't delete the question, just be more specific in the title. that it pertains to the STL import addon. -- i'll elaborate in my answer. $\endgroup$
    – zeffii
    Commented Feb 4, 2016 at 21:01

1 Answer 1

2
$\begingroup$

bpy.ops.export_mesh.stl() will be present without explicitly enabling the add-on. io_mesh_stl is enabled already by default, re-enabling it seems to be the problem here.

Exactly why you get that error is not something I'd spend much time on as a user, considering the fact that it can be avoided by not re-enabling the add-on.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .