USD Import: prim_path_mask does not use or behave like USDStage.OpenMasked #102594
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#102594
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: any
Graphics card: any
Blender Version
Broken: 3.4.0 Alpha)
Apologies if this should not be logged as a bug, but it feels like one.
Opening stages with a population mask is a powerful feature to handle large stages with USD. It's great that blenders' import USD method supports a prim_path_mask, but unfortunately this seems to be limited to a single prim (path). The UsdStage.OpenMasked on the other hand supports a list paths via USD's population mask class.
Additionally, the prim_path_mask causes the prim to be imported at the root of the hierarchy, whilst UsdStage.OpenMasked preserves the SdfPath.
It would be great if this could be implemented by setting the population mask on the stage before it is opened rather than fixing the existing GetPrimAtPath based method here:
https://github.com/blender/blender/blob/master/source/blender/io/usd/intern/usd_reader_stage.cc#L283
Exact steps for others to reproduce the error
Download the Animal Logic Alab
This "works"
bpy.ops.wm.usd_import(filepath="C:\Users\jjebens\Downloads\alab-v2.0.0\ALab\entity\electronics_portable_tv01\electronics_portable_tv01.usda", prim_path_mask="/root/GEO/handle01_M_geo")
This should work, but doesn't
bpy.ops.wm.usd_import(filepath="C:\Users\jjebens\Downloads\alab-v2.0.0\ALab\entity\electronics_portable_tv01\electronics_portable_tv01.usda", prim_path_mask=["/root/GEO/handle01_M_geo", "/root/GEO/dial01_M_geo"])
Added subscriber: @jjebens
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
It is possible that not having more than one path is a limitation of the API, as Blender doesn't support string array as far as I know.
Though I am not knowledgeable enough about USD to triage the other concern about preserving the SdfPath, so I will tag the module fore more information.
This is actually already implemented for Blender's
universal-scene-description
branch. I am working on creating a pull request to merge this feature intomain
. This is one of the relevant commits that I am porting tomain
:90f1d1f4b6
As for supporting multiple file paths, this will be accomplished by allowing the
prim_path_mask
option to contain multiple entries delimited by spaces, commas or semicolons.I created a pull request for this feature here:
#106974