USD Import Renames Prim above Mesh #123820
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#123820
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23
Blender Version
Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash:
40a5e739e270
Short description of error
When importing a USD file the Import renames Prim above Mesh to match the Object Data name.
This is possibly going to be hard to explain, due to terminology. By default blender has a object name Suzanne (orange triangle) and the Object Data below (green triangle) is also called Suzanne. When exported to to USD the object name gets stored as a 'Xform' prim and the Object Data gets stored as a 'Mesh' prim. Perfect!
The issue is upon importing. It appears that the 'Mesh' prim name over write the name of the 'Xform' prim, meaning in Blender we get a object name of whatever the name of the Object Data below is called.
This actually goes further up, if you have the object under an actual 'Xform' prim and you manually remove that in the usd file, then that 'Xform' prim gets named based on the Object Data, which is very concerning.
Hopefully the images attached explain it clearly.
Exact steps for others to reproduce the error
Create a hierarchy with some Empties like this:
export this to USD, then reimport it to Blender and you will get:
if I manually remove the xform prim in the USD file representing 'Suzanne' (orange triangle) then re-import it the 'geo' empty will be renamed now:
Ideally the import should match the export with the Object Name and Object Data names being the same.
In the case of the manual removal, I am not sure what to suggest in terms of how it should handle this situation. Either create an Object to store the Mesh Data or have a tick box asking the user if it should use the prim above as the Object. But the way it removed the 'geo' prim from the hierarchy is not great.
Can confirm, will check (Alembic does not have the same issue btw...)
Awesome, thanks for looking into that.
Interestingly maya has a similar issue, but it actually makes another Data Object so it goes in the opposite direction: https://github.com/Autodesk/maya-usd/issues/3837
this is the export of the attached .blend (so that is indeed fine)
Looking at the import now...
Comparing
AbcObjectReader::AbcObjectReader
andUSDPrimReader::USDPrimReader
there might be ways to extract the parent Xform fromGetPrimPath()
, lets see...OK, PoC (below is the patched import) is working, will refine and check with the module tomorrow...
Amazing stuff 😋 not sure if everyone's use case will be the same... but this solution looks promising.
Sorry I think I clicked 'Close with Comment' by accident instead of 'Comment'
@deadpin @makowalski FYI :)
@lichtwerk Thanks for looking into this! Yes, by all means, please create a pull request for this patch when you are ready.
Fix is up, see !124041