← All ideas
  • Published 2 Dec 2019

export to stl with apply render modifier [instead of preview modifier]

hey hey,

Since I 3D print a lot and therefore make use of several modifiers, I need to export the applied modifiers to get the 'real' 3D data. To keep the speed I use the lower preview settings and only let blender calculate the high res when exporting.

In version 2.76 I 'hacked the export code in file scripts/addons/io_mesh_stl/ blender_utils.py :

try:
#        mesh = ob.to_mesh(bpy.context.scene, use_mesh_modifiers, "PREVIEW")
    mesh = ob.to_mesh(bpy.context.scene, use_mesh_modifiers, "RENDER")

But the new code looks so different, how can I say that it should use the Render setting

# get the modifiers
if use_mesh_modifiers:
    depsgraph = bpy.context.evaluated_depsgraph_get()
    mesh_owner = ob.evaluated_get(depsgraph)
else:
    mesh_owner = ob

any tips on this...!? (would be really nice to have this option in the gui when exporting meshes... : )

cheers / joris

btw, I am a product designer,not a programmer...

100%

Development Status: Open

Upvote 1 Downvote 0
rooiejoris
2 Dec 2019

2 Comments

peter.boos

if you do stl it has an option to aply modifiers (2.8) menu export (dont know for the 3d print addon)

rooiejoris Author

* @peter.boos * It will apply the modifiers, but not the settings as set in 'render'. For example the subdivision modifier I set the "render" sudivisions higher than the "viewport" setting. Then modeling is still quite fast and you only have to 'render' the high sub divisions when you export.