
Print("No triangular faces were found, so function aborting")įaces = numpy.asarray(faces, dtype=numpy.int32) Print("WARNING: Meshlab will only accept faces with THREE vertices") # print() # must report float64įor loop_index in range(poly.loop_start, poly.loop_start + poly.loop_total):ĬurFace.append(_index) # print(verts.shape) # must report (numOfVerts, 3) Print("No vertices were found, so function aborting") Verts = numpy.asarray(verts, dtype=numpy.float64) # faces have to be triangulated - quads and ngons are not allowed # verts and faces have to be provided in a numpy array with verts as type float64 and faces as int32 NB (!!) MeshLab will only import triangular meshes so you have to convert the mesh first.Īlso MeshLab requires the mesh data to be in Numpy arrays, and Blender from_pydata requires it as standard lists (but this conversion is manaaged within the export/import functions). This example will take the selected object mesh and send it to MeshLab, then bring it back as a new mesh linked to the scene.

Oh heres a minimal example of the actual process of exporting and importing to/from MeshLab. filter_sketchfab.dll: filter_sketchfab.dll does not seem to be a Qt Plugin.*Ĭannot load library C:…\filter_sketchfab.dll: The specified module could not be found.Warning: Unable to load the following plugins:
Incidentally when I import pymeshlab I get the following error in the Blender python console but not in the System console, and it seems to work fine (so I just ignore it) Pymeshlab.print_filter_parameter_list('discrete_curvatures')įor instruction on the process of strategy to load a blender mesh in to meshlab see the tutorial Print("> pymeshlab.print_filter_parameter_list('discrete_curvatures')") Print("SPECIFIC FILTER PARAMETERS can be listed for each filter, eg:-") Output will appear in the System Console window (not the main Blender Python window)

The following is a simple script to check it’s working. Subprocess.call()Īfter restart you can import meshlab using Blender Python and pass it meshes and run filters on them without having to save and load it back and forth as a file Python_exe = os.path.join(sys.prefix, 'bin', 'python.exe') Then paste the following into the scripting workspace and run it import subprocess Open up the System Console (under the Window menu) JUST THIS ONCE open Blender by R-clicking on it in the start menu and select"Run as Administrator"
Meshlab import windows#
You can do this from the Blender scripting workspace in Blender 2.92īUT you have to have admininistor priviledges so for Windows users
