MCPcopy Create free account
hub / github.com/BladeTransformerLLC/gauzilla / main

Function main

convert.py:64–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63# python3 convert.py path_to_ply --level [0, 1, 2, ...]
64def main():
65 parser = argparse.ArgumentParser(description="Convert PLY files to SPLAT format.")
66 parser.add_argument(
67 "input_files", nargs="+", help="The input PLY files to process."
68 )
69 parser.add_argument(
70 "--output", "-o", default="output.splat", help="The output SPLAT file."
71 )
72 parser.add_argument(
73 "--level", "-l", default=0, help="The level of detail. [0, 1, 2, ...]"
74 )
75 args = parser.parse_args()
76 for input_file in args.input_files:
77 print(f"Processing {input_file}...")
78 splat_data = process_ply_to_splat(input_file, args.level)
79 output_file = (
80 args.output if len(args.input_files) == 1 else input_file + ".splat"
81 )
82 save_splat_file(splat_data, output_file)
83 print(f"Saved {output_file}")
84
85
86if __name__ == "__main__":

Callers 1

convert.pyFile · 0.70

Calls 2

process_ply_to_splatFunction · 0.85
save_splat_fileFunction · 0.85

Tested by

no test coverage detected