Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAras Pranckevicius <aras@nesnausk.org>2022-08-24 15:17:18 +0300
committerAras Pranckevicius <aras@nesnausk.org>2022-08-24 15:17:18 +0300
commit296383210971045cb0b4704847d1e427bfa6817d (patch)
treead0b84163fbe44e73768e8ae9d331ebeed3ba63f
parent4f050118742e44fc7884bcc31fbe54c50981e336 (diff)
object_print3d_utils: switch 3D Print Toolbox obj export to use the new exporter
The 3D Print Toolbox addon was using the Python based exporter API, switch it to use the C++ based obj exporter. This is faster, supports vertex color attributes, and allows to remove the Python based exporter some day. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D15769
-rw-r--r--object_print3d_utils/export.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/object_print3d_utils/export.py b/object_print3d_utils/export.py
index e4e3550b..11ce5e00 100644
--- a/object_print3d_utils/export.py
+++ b/object_print3d_utils/export.py
@@ -134,17 +134,17 @@ def write_mesh(context, report_cb):
use_normals=export_data_layers,
)
elif export_format == 'OBJ':
- addon_ensure("io_scene_obj")
filepath = bpy.path.ensure_ext(filepath, ".obj")
- ret = bpy.ops.export_scene.obj(
+ ret = bpy.ops.wm.obj_export(
filepath=filepath,
- use_mesh_modifiers=True,
- use_selection=True,
- global_scale=global_scale,
+ apply_modifiers=True,
+ export_selected_objects=True,
+ scaling_factor=global_scale,
path_mode=path_mode,
- use_normals=export_data_layers,
- use_uvs=export_data_layers,
- use_materials=export_data_layers,
+ export_normals=export_data_layers,
+ export_uv=export_data_layers,
+ export_materials=export_data_layers,
+ export_colors=export_data_layers,
)
else:
assert 0