Added ASCII export functionality for STL and PLY. #3
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,9 @@
|
||||
# Generic files to ignore.
|
||||
.*
|
||||
|
||||
print3d.rsa
|
||||
print3d.rsa.pub
|
||||
|
||||
# Python temp paths.
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
@ -17,3 +20,4 @@ __pycache__/
|
||||
|
||||
# Locally built extensions.
|
||||
/*.zip
|
||||
|
||||
|
@ -47,6 +47,11 @@ class SceneProperties(PropertyGroup):
|
||||
description="Apply scene scale setting on export",
|
||||
default=False,
|
||||
)
|
||||
use_ascii_export: BoolProperty(
|
||||
name="ASCII",
|
||||
description="Exporting file in ASCII format, export binary as binary otherwise.",
|
||||
default=False,
|
||||
)
|
||||
use_data_layers: BoolProperty(
|
||||
name="Data Layers",
|
||||
description=(
|
||||
|
@ -100,7 +100,7 @@ def write_mesh(context, report_cb):
|
||||
filepath = bpy.path.ensure_ext(filepath, ".stl")
|
||||
ret = bpy.ops.wm.stl_export(
|
||||
filepath=filepath,
|
||||
ascii_format=False,
|
||||
ascii_format=print_3d.use_ascii_export,
|
||||
apply_modifiers=True,
|
||||
export_selected_objects=True,
|
||||
global_scale=global_scale,
|
||||
@ -109,7 +109,7 @@ def write_mesh(context, report_cb):
|
||||
filepath = bpy.path.ensure_ext(filepath, ".ply")
|
||||
ret = bpy.ops.wm.ply_export(
|
||||
filepath=filepath,
|
||||
ascii_format=False,
|
||||
ascii_format=print_3d.use_ascii_export,
|
||||
apply_modifiers=True,
|
||||
export_selected_objects=True,
|
||||
global_scale=global_scale,
|
||||
|
@ -135,6 +135,9 @@ class VIEW3D_PT_print3d_export(View3DPrintPanel, Panel):
|
||||
col.prop(print_3d, "use_apply_scale")
|
||||
col.prop(print_3d, "use_export_texture")
|
||||
sub = col.column()
|
||||
sub.active = print_3d.export_format in ("STL", "PLY")
|
||||
sub.prop(print_3d, "use_ascii_export")
|
||||
sub = col.column()
|
||||
sub.active = print_3d.export_format != "STL"
|
||||
sub.prop(print_3d, "use_data_layers")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user