USD: skip exporting deform group attributes #111894
No reviewers
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
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 & 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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111894
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "makowalski/blender:usd_no_defgroup_attr_export"
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?
No longer exporting mesh attributes that correspond to deform
groups.
This is to avoid potential name collisions when importing the
USD back into Blender, as described in #111747.
This preemptively addresses an issue which will arise when
exporting armatures to USD is supported, because the deform group
attributes and the UsdSkel mesh skinning data will be redundant.
In the future we might consider refining this behavior with a USD
export option to allow exporting some vertex group attributes but
not others.
Testing
To test, export a Blender scene containing a mesh with an armature
modifier to USD and verify that there are no
primvars
correspondingto the deform groups on the USD mesh. For example, export test scene
tests/animation/CtrlObject.blend
to USDA, open the exported file in a texteditor and verify that attributes
Top
,Left
andRight
are not be saved asprimvars
on the mesh.@blender-bot build
Michael Kowalski referenced this pull request2023-09-04 18:19:11 +02:00
USD: skip exporting deform group attributes.to USD: skip exporting deform group attributes@ -103,6 +104,10 @@ void USDGenericMeshWriter::write_custom_data(const Mesh *mesh, pxr::UsdGeomMesh
return true;
}
if (BKE_id_defgroup_name_find(&mesh->id, attribute_id.name().data(), nullptr, nullptr)) {
Would be nice to reference something like the function name that gives the reader somewhere to look for where vertex groups are handled separately.
Shouldn't the skipping of exporting vgroups as generic attributes be conditioned to the fact they they are actually exported as part of binding data for a usdSkel?
That's a good point and occurred to me as well, though I was a little unsure if we wanted to postpone supporting IO of vertex group attributes at the moment.
I could change the implementation to selectively remove conflicting attributes when the
UsdSkel
bindings are created. It In that case, this should probably be part of theUsdSkel
export pull request #111931, since main doesn't currently export theUsdSkel
bindings at all.Does this sound reasonable?
Sounds good, but I think it would be better to not export the vertex group attributes that would be redundant in the first place. I guess that requires some communication between the
UsdSkel
export and attribute export. Delaying this PR until #111931 lands seems like the right approach.That also sounds okay to me. Reasonable since Blender is still resolving this difference between vertex group storage and attribute storage itself. But like I mentioned before, then we would just have the problem again when the storage is unified, so doing it preemptively like you mentioned above seems better to me.
yes also sounds good to me.
Checkout
From your project repository, check out a new branch and test the changes.