Fix: Small changes to USD and Alembic curves import #118829

Merged
Hans Goudey merged 3 commits from HooglyBoogly/blender:cleanup-usd-abc-curves-import into main 2024-02-28 05:06:02 +01:00
Member

Make both importers work the same way: first building an array
of the new offsets, then comparing the offsets to check if the
topology changed. Previously the USD importer incorrectly
compared curve offsets to USD point counts.

Also:

  • Don't unnecessarily set the resolution to the incorrect default.
    The default for the curves system is 12. But it's unnecessary to
    fill the attribute to the default value anyway.
  • Use some helper methods to iterate over all curves.
  • Use float literal instead of integer.
  • Use cast and copy_from for positions copy
Make both importers work the same way: first building an array of the new offsets, then comparing the offsets to check if the topology changed. Previously the USD importer incorrectly compared curve offsets to USD point counts. Also: - Don't unnecessarily set the resolution to the incorrect default. The default for the curves system is 12. But it's unnecessary to fill the attribute to the default value anyway. - Use some helper methods to iterate over all curves. - Use float literal instead of integer. - Use cast and `copy_from` for positions copy
Hans Goudey added 1 commit 2024-02-28 03:52:35 +01:00
2adbc2afc0 Fix: Small changes to USD and Alembic curves import
Make both importers work the same way: first building an array
of the new offsets, then comparing the offsets to check if the
topology changed. Previously the USD importer incorrectly
compared curve offsets to USD point counts.

Also:
- Don't unnecessarily set the resolution to the incorrect default.
  The default for the curves system is 12. But it's unnecessary to
  fill the attribute to the default value anyway.
- Use some helper methods to iterate over all curves.
- Use float literal instead of integer.
Hans Goudey requested review from Jesse Yurkovich 2024-02-28 03:52:47 +01:00
Hans Goudey added this to the Pipeline, Assets & IO project 2024-02-28 03:52:53 +01:00
Hans Goudey added 1 commit 2024-02-28 04:01:47 +01:00
Jesse Yurkovich approved these changes 2024-02-28 04:49:10 +01:00
Jesse Yurkovich left a comment
Member

Thanks for taking a look here. calc_curve_offsets makes things a lot nicer. In the future you can punt this work back to me if you like; just nudge me in the direction you want and I'll try to take care of it.

While you're in here, do you mind dropping the reference from line 62:
const Span<pxr::GfVec3f> &usdPoints

Thanks for taking a look here. `calc_curve_offsets` makes things _a lot_ nicer. In the future you can punt this work back to me if you like; just nudge me in the direction you want and I'll try to take care of it. While you're in here, do you mind dropping the reference from line 62: `const Span<pxr::GfVec3f> &usdPoints`
Hans Goudey added 1 commit 2024-02-28 05:00:30 +01:00
Author
Member

In the future you can punt this work back to me if you like; just nudge me in the direction you want and I'll try to take care of it.

Thanks! I'll keep that in mind! This time this was just stuff I noticed reading through the code as a refresher.

>In the future you can punt this work back to me if you like; just nudge me in the direction you want and I'll try to take care of it. Thanks! I'll keep that in mind! This time this was just stuff I noticed reading through the code as a refresher.
Hans Goudey merged commit 5c5089d651 into main 2024-02-28 05:06:02 +01:00
Hans Goudey deleted branch cleanup-usd-abc-curves-import 2024-02-28 05:06:04 +01:00
Sign in to join this conversation.
No reviewers
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 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#118829
No description provided.