diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2022-02-11 03:01:35 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2022-02-11 03:01:35 +0300 |
commit | bfec050a9716e0867dfe1b884877ac0e5ebcae54 (patch) | |
tree | 1f0c8b049661e03d0cff54c18bc33d5a76c6668d | |
parent | eaf3ebb822bc4925665ac99917e8332bffa3d62f (diff) |
Another way to disable old obj exporter.
The previous commits to split the obj importer/exporter into two
had the bad side effect of breaking the Python API for the importer
and exporter. So it was reverted and this less drastic method is used:
just don't put the python exporter into the menu. This way the
old scripts using bpy.ops.import_scene.import and .export will still
work (at least until we remove them completely in a future release).
The new obj exporter can be accessed in python right now as
bpy.ops.wm.export_obj(), which is probably not the best name but that
can be fixed later.
-rw-r--r-- | io_scene_obj/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index 78c2314e..c5335f3d 100644 --- a/io_scene_obj/__init__.py +++ b/io_scene_obj/__init__.py @@ -501,12 +501,16 @@ def register(): bpy.utils.register_class(cls) bpy.types.TOPBAR_MT_file_import.append(menu_func_import) - bpy.types.TOPBAR_MT_file_export.append(menu_func_export) + # Disabling the menu entry for this python exporter now that + # there is a C++ exporter. For now, leaving the actual + # export_scene.obj pointing at the python version. + # bpy.types.TOPBAR_MT_file_export.append(menu_func_export) def unregister(): bpy.types.TOPBAR_MT_file_import.remove(menu_func_import) - bpy.types.TOPBAR_MT_file_export.remove(menu_func_export) + # See comment above about menu for the python exporter + # bpy.types.TOPBAR_MT_file_export.remove(menu_func_export) for cls in classes: bpy.utils.unregister_class(cls) |