Import .obj with more than one unnamed object fails. #67673
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#67673
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits
Graphics card: NVIDIA GeForce GTX 1080 Ti OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-10.33.0 387.10.10.10.40.122
Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-18 14:52, hash:
38d4483c6a
Worked: (2.79b)
Short description of error
Import .obj with more than one unnamed object fails.
Exact steps for others to reproduce the error
Based on the default startup
File > Import > Wavefront (.obj) attached files
One unnamed object is ok
single_unnamed.obj
Two named objects are ok
two_named.obj
Two unnamed fails :
two_unnamed.obj
Traceback (most recent call last):
TypeError: %b requires a bytes-like object, or an object that implements bytes, not 'NoneType'
location: :-1
Added subscriber: @ph-1
Added subscriber: @rjg
The function
unique_name
fails to generate unique names when the providedname_orig
isNone
. I'm not sure if empty names are allowed in the format, it's not mentioned in the spec. This could be fixed by generating a random name.What software produced these .obj files?
Added subscriber: @mont29
@mont29 Your opinion on this?
I produced those 3 .obj files by hand with some basic cube example to illustrate the problem.
I noticed this while working on a threejs project. I first thought it was due to a malformed exported file and yes the file has some issues, but checking against blender 2.79 it worked
I could provide it if really needed but with basic example the problem stays the same.
The traceback indicates unique_name, I tried naming objects and the problem was gone.
I think it's a bug because as you said it's not mentioned in the spec and other 3D softwares have no problem opening those files.
Here you can check other .obj produced by threejs . I made 2 files from the "multiple" example with objects names (added by me, works) and without (default export, fails) so you can try:
named.obj unnamed.obj
The behavior in 2.79b is different, but the import of multiple unnamed objects doesn't work there either. It just imports one of them.
Now the question is whether your handcrafted files are considered valid .obj format and therefore should be supported. That isn't my call to make, one of the devs or project owners has to decide.
@rjg You're right, it doesn't work the same but at least it imports something :)
Will check how to handle multiple unamed objects...
This issue was referenced by blender/blender-addons@5f579088bb
Changed status from 'Open' to: 'Resolved'