import struct import sys def extract_3ds_texture_paths(three_ds_path): """ Reads a .3ds file and returns a list of referenced texture filenames. Args: three_ds_path (str): Path to the .3ds file. Returns: List[str]: Texture filenames referenced in the .3ds file. """ paths = [] with open(three_ds_path, 'rb') as f: while True: header = f.read(6) if len(header) < 6: break chunk_id, chunk_len = struct.unpack('") sys.exit(1) input_path = sys.argv[1] textures = extract_3ds_texture_paths(input_path) if textures: print("Referenced textures:") for tex in textures: print(f"- {tex}") else: print("No texture filenames found in the .3ds file.") if __name__ == '__main__': main()