Has3ong / X3DViewer

ISO/IEC 19777-6 Python X3D Test Viewer
1 stars 0 forks source link

Cannot view any x3d models on Windows #1

Open amaendle opened 2 years ago

amaendle commented 2 years ago

Whenever I try to open a file (using the "FileOpen" button), after choosing a file the warning appears:

"x3d, wrl 외에 다른 확장자 파일를 선택하셨습니다."

The same happens with any *.x3d file, even those which are included as examples.

amaendle commented 2 years ago

I slightly changed the Window.py, now it works:

import os
#...
    def OnOpenDocument(self):
#...
        filename, extension = os.path.splitext(filepath)
                    if extension == '.x3d': 
#...

Problem was, that there was another dot in the filepath, so your original method to extract the file extension does not work.