Keeps happening, I slightly modified the script thinking that may be it was a output path issue but seems like not:
ExportModel: path = E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/01_DATA_SOURCE_POINT_CLOUDS/03_Normals/08OE2725.fbx, save_texture = off, save_colors = off, save_cameras = off, format = ModelFormatFBX, clip_to_boundary = off
Traceback (most recent call last):
File "E:\LIDAR_JAPAN\MMS8_Prototype_3\zz_Batch_commands\MMS\04_e_NormalTexture_Mesh_Metashape.py", line 43, in <module>
chunk.exportModel(mesh_file_path, format=Metashape.ModelFormatFBX, save_colors=False, save_texture=False, save_normals=True, save_confidence=False, save_cameras=False, clip_to_boundary=False, binary=True)
OSError: No license found
I've a quired a node locked license for the standard edition, rebooted yet same error.
Here slightly modifed script with export path on top, for convenience:
import Metashape, os
# Set the folder path containing the point clouds
point_cloud_folder_path = "E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/01_DATA_SOURCE_POINT_CLOUDS/00_color"
# Set the output folder for the exported meshes
export_folder_path = "E:/LIDAR_JAPAN/MMS8_Prototype_3/MMS/03_RoadMesh/04_Texturing/01_DATA_SOURCE_POINT_CLOUDS/03_Normals/"
# Create a new Metashape document
doc = Metashape.Document()
# Loop over each file in the folder
for file_name in os.listdir(point_cloud_folder_path):
# Check if the file is a .ply file
if file_name.lower().endswith(".ply"):
print(" ********************************************** Processing " + file_name)
# Create a new chunk for the current file
chunk = doc.addChunk()
# import all point clouds in the folder
import_points = Metashape.Tasks.ImportPointCloud()
import_points.path = point_cloud_folder_path + "/" + file_name
import_points.format = Metashape.PointCloudFormatPLY
import_points.apply(chunk)
chunk.resetRegion()
build_model = Metashape.Tasks.BuildModel()
build_model.source_data = Metashape.DataSource.PointCloudData
build_model.surface_type = Metashape.SurfaceType.Arbitrary
build_model.face_count = Metashape.FaceCount.MediumFaceCount
build_model.vertex_colors = False
build_model.vertex_confidence = False
build_model.interpolation = Metashape.Interpolation.Extrapolated
build_model.apply(chunk)
# Export the mesh as a .FBX file
mesh_file_name = os.path.splitext(file_name)[0] + ".fbx"
mesh_file_path = os.path.join(export_folder_path, mesh_file_name)
chunk.exportModel(mesh_file_path, format=Metashape.ModelFormatFBX, save_colors=False, save_texture=False, save_normals=True, save_confidence=False, save_cameras=False, clip_to_boundary=False, binary=True)
doc.remove(chunk)
print("Processed " + file_name)
print("Script finished")
I0ve attached a very small .ply to make fast iterations, I had no luck tho, had to come here for help :\
https://drive.google.com/file/d/1w_c4h0UL_vH7B8D_FBvR2YePI9vx1gc4/view?usp=share_link