# Any Python Code Example for RemeshModifier API?

I'm new to Python and Blender, so my question could be ambiguous.

I have to make Python script that remeshing OBJ files on Command Line Interface.

I've googled about it and probably result code gonna being like this.

import bpy
import sys

argv = sys.argv
argv = argv[argv.index("--") + 1:] # get all args after "--"

obj_in = argv[0]
obj_out = argv[1]

bpy.ops.import_scene.obj(filepath=obj_in, axis_forward='-Z', axis_up='Y')

#
# Applying RemeshModifier API
#

bpy.ops.export_scene.obj(filepath=obj_out, axis_forward='-Z', axis_up='Y')

./blender --background --factory-startup --python MyScript.py -- input.obj output.obj


It seems I have to learn about getopt library since RemeshModifier has various modifier.

But applying RemeshModifier part is hard to find example to learn.

If there is link that I can study for this, please show me. Many thanks for reading.

• There are three different remesh operator in Blender: Voxel Remesher, Quadriflow Remesh, Remesh modifier (which is a general remesher). Did you try them out first? And I personally recommend non-blender Instant Meshes for its robust against complicate topology. Sep 29 '20 at 14:06
• No I didn't try them. Then I'll study about them first. Many thanks for detailed comment. Sep 30 '20 at 10:53