New OBJ import: fileselector doesn't filter *.obj but shows all model-like files #97751

Closed
opened 2022-05-01 09:59:07 +02:00 by Scurest · 11 comments
Contributor

System Information
Operating system: Linux

Blender Version
Broken: blender-3.2.0-alpha+master.12217714c717

Short description of error
The fileselect window for the old OBJ importer only shows *.obj;*.mtl files. The new importer shows some other filetypes (.gltf and .fbx for example) and doesn't show .mtl files (not sure if that's intentional).

Exact steps for others to reproduce the error
File>Import>Wavefront (.obj) (experimental), and navigate to a folder containing both .obj and .fbx/.gltf files.
CompareImportFiles.png

**System Information** Operating system: Linux **Blender Version** Broken: blender-3.2.0-alpha+master.12217714c717 **Short description of error** The fileselect window for the old OBJ importer only shows `*.obj;*.mtl` files. The new importer shows some other filetypes (.gltf and .fbx for example) and doesn't show .mtl files (not sure if that's intentional). **Exact steps for others to reproduce the error** File>Import>Wavefront (.obj) (experimental), and navigate to a folder containing both .obj and .fbx/.gltf files. ![CompareImportFiles.png](https://archive.blender.org/developer/F13043248/CompareImportFiles.png)
Author
Contributor

Added subscriber: @scurest

Added subscriber: @scurest

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @rjg

Added subscriber: @rjg

Currently the WM_OT_obj_import in [io_obj.c ]] uses the FILE_TYPE_OBJECT_IO flag to filter the files. As can be seen in ED_path_extension_type from [ https:*developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_file/filelist.c | filelist.c , this flag encompasses .obj, .3ds, .fbx, .glb, .gltf and .svg.

Currently the `WM_OT_obj_import` in [io_obj.c ]] uses the `FILE_TYPE_OBJECT_IO` flag to filter the files. As can be seen in `ED_path_extension_type` from [[ https:*developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_file/filelist.c | filelist.c ](https:*developer.blender.org/diffusion/B/browse/master/source/blender/editors/io/io_obj.c), this flag encompasses `.obj`, `.3ds`, `.fbx`, `.glb`, `.gltf` and `.svg`.
Aras Pranckevicius self-assigned this 2022-05-01 19:12:15 +02:00
Aras Pranckevicius changed title from New OBJ import: fileselector doesn't filter *.obj to New OBJ import: fileselector doesn't filter *.obj but shows all model-like files 2022-05-01 19:12:36 +02:00

Regression, marking as high prio

Regression, marking as high prio

Yeah looks like that for some reason FILE_TYPE_OBJECT_IO, even if the comments/docs say "filter OBJ files", actually filters obj+3ds+fbx+glb+gltf+svg. So this issue also affects "import/export svg as grease pencil" menu entries -- they also not only show svg files, but all the extensions from this list.

I'm trying to figure out with the folks who wrote that code originally, whether this is by design or something that should be fixed.

Yeah looks like that for some reason FILE_TYPE_OBJECT_IO, even if the comments/docs say "filter OBJ files", actually filters obj+3ds+fbx+glb+gltf+svg. So this issue also affects "import/export svg as grease pencil" menu entries -- they also not only show svg files, but all the extensions from this list. I'm trying to figure out with the folks who wrote that code originally, whether this is by design or something that should be fixed.

@aras_p Presumably the code was written before the filtering was necessary from the C code as the Python add-ons defined what file extensions to filter for. Dedicated flags for the file types seem to be the most straight forward approach.

@aras_p Presumably the code was written before the filtering was necessary from the C code as the Python add-ons defined what file extensions to filter for. Dedicated flags for the file types seem to be the most straight forward approach.
Aras Pranckevicius removed their assignment 2022-05-04 15:13:09 +02:00
Julian Eisel was assigned by Aras Pranckevicius 2022-05-04 15:13:09 +02:00

Added subscriber: @aras_p

Added subscriber: @aras_p

This issue was referenced by aee8e49031

This issue was referenced by aee8e49031464215998a71b05dd4b20fb57959d8

This issue was referenced by aae2ff49f5

This issue was referenced by aae2ff49f5b8bd7aeb219f1505d415c5744133c1
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne added this to the Pipeline, Assets & IO project 2023-02-09 15:40:49 +01:00
Bastien Montagne removed this from the Pipeline, Assets & IO project 2023-02-10 12:49:29 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#97751
No description provided.