uhlik / bpy

blender python scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not import any .ply files

guiglass opened this issue · comments

I have just enabled this addon for Blender 2.82, when I open a .ply file from the PCV menu I get error:

too many values to unpack (expected 3)
No vertices loaded from file at C:\Users...\pointcloud.ply

There's no tracback information either, only a single print statement so I can't even begin to debug the error because I have no idea which line or python file to check.

I think my .ply format is correct, but there are no example .ply files in this project to confirm that the addon is even working. Could you please add example color .ply to help new users figure out how this addon works?

Also I have binary .ply files that I can import normally as simple .ply in Blender without issue, but when I try to import same file using this addon I get an error:

'ascii' codec can't decode byte 0xe9 in position 1: ordinal not in range(128)
No vertices loaded from file at C:\Users...\pointcloud_binary.ply

commented

i assume you have older pcv 0.9.x from repo right? get rid of try statement here https://github.com/uhlik/bpy/blob/master/space_view3d_point_cloud_visualizer.py#L2859 and you get traceback, or you can do something like this from blender text editor and run

# writing from memory, it is not tested..
from space_view3d_point_cloud_visualizer import PlyPointCloudReader
p = "path to ply.."
r = PlyPointCloudReader(p)

i think you ply file is somehow malformed, especially this part 'ascii' codec can't decode, in binary ply, there is just header that is ascii, and if python can't decode with str.decode('ascii'), then it is not ascii

or you can send me the file to have a look, this is actually first time (alright, second, but that first time it was unusual color channels names) somebody have issue with ply loader and i'd like to fix that