Fix: USD: animated primvar import #120500

Merged
Michael Kowalski merged 2 commits from makowalski/blender:usd_fix_animated_privar_import into main 2024-04-11 17:22:55 +02:00

Fixed bug preventing update of time varying attribute values when
reading USD meshes with the mesh sequence cache modifier.

This bug was a regression accidentally caused by the container cleanup
in b0db5363fa

I should have caught this when I reviewed that pull request. I plan to add
a test case for this in a separate pull request to help avoid regressions in the future.

To test, load the attached plane_animating_color.usda and enable attribute colors
in the viewport. Without this fix, the color does not animate.

Fixed bug preventing update of time varying attribute values when reading USD meshes with the mesh sequence cache modifier. This bug was a regression accidentally caused by the container cleanup in https://projects.blender.org/blender/blender/commit/b0db5363fac313a5bae87850c6550857b9d86beb I should have caught this when I reviewed that pull request. I plan to add a test case for this in a separate pull request to help avoid regressions in the future. To test, load the attached `plane_animating_color.usda` and enable attribute colors in the viewport. Without this fix, the color does not animate.
Michael Kowalski added the
Interest
Pipeline, Assets & IO
Interest
USD
labels 2024-04-11 01:57:47 +02:00
Michael Kowalski added 1 commit 2024-04-11 01:57:56 +02:00
Fixed bug preventing update of time varying attribute values when
reading USD meshes with the mesh sequence cache modifier.
Michael Kowalski added this to the USD project 2024-04-11 01:58:00 +02:00
Michael Kowalski requested review from Jesse Yurkovich 2024-04-11 01:58:15 +02:00
Jesse Yurkovich approved these changes 2024-04-11 03:17:18 +02:00
Jesse Yurkovich left a comment
Member

Indeed, there's a nuanced sequence of events here. This seems fine as this simply reverts to the form of the conditional before my change and I've verified it works now locally too.

And yes a separate PR for the test would be much appreciated :)

Indeed, there's a nuanced sequence of events here. This seems fine as this simply reverts to the form of the conditional before my change and I've verified it works now locally too. And yes a separate PR for the test would be much appreciated :)
Author
Member

Thanks so much for the review, @deadpin!

As a minor additional change before committing, I will replace the call .lookup_default() with a call to .lookup() in the conditional. This should be safe, since .lookup() will only be evaluated if the key is in the map.

Thanks so much for the review, @deadpin! As a minor additional change before committing, I will replace the call `.lookup_default()` with a call to `.lookup()` in the conditional. This should be safe, since `.lookup()` will only be evaluated if the key is in the map.
Michael Kowalski added 1 commit 2024-04-11 17:11:31 +02:00
Replace the call to Map::lookup_default() with a call to Map::lookup().
This should be safe, since .lookup() will only be evaluated if the key
is in the map in this case.
Michael Kowalski merged commit 65748260f9 into main 2024-04-11 17:22:55 +02:00
Michael Kowalski deleted branch usd_fix_animated_privar_import 2024-04-11 17:22:58 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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
2 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#120500
No description provided.