USD: Fix for spammy attribute prints for unsupported and non-array attributes #112298

Merged
Michael Kowalski merged 1 commits from CharlesWardlaw/blender:bugfix/non_array_params into blender-v4.0-release 2023-10-24 15:31:19 +02:00

This pull addresses the following issue: #112294 -- the file provided now only generates one error, which I believe is important to keep.

  • Added support for Point3* and Normal3* attributes as CD_PROP_FLOAT3
  • Caught the last two quaternion formats.
  • Silenced prints on quaternion and string formats, as they are known unsupported attributes.
This pull addresses the following issue: https://projects.blender.org/blender/blender/issues/112294 -- the file provided now only generates one error, which I believe is important to keep. - Added support for Point3* and Normal3* attributes as CD_PROP_FLOAT3 - Caught the last two quaternion formats. - Silenced prints on quaternion and string formats, as they are known unsupported attributes.
Charles Wardlaw added 1 commit 2023-09-12 21:10:11 +02:00
Michael Kowalski added the
Interest
USD
Interest
Pipeline, Assets & IO
labels 2023-09-12 21:13:45 +02:00
Michael Kowalski added this to the USD project 2023-09-12 21:13:52 +02:00
Hans Goudey reviewed 2023-09-12 21:31:42 +02:00
@ -912,0 +925,4 @@
if (ELEM(type,
pxr::SdfValueTypeNames->StringArray,
pxr::SdfValueTypeNames->QuatfArray,
pxr::SdfValueTypeNames->QuatdArray,
Member

It's unclear why quaternions have to be skipped here since they are handled in convert_usd_type_to_blender. Are you sure about that part?

It's unclear why quaternions have to be skipped here since they are handled in `convert_usd_type_to_blender`. Are you sure about that part?
Author
Member

Yes, because convert_usd_type_to_blender still returns them but not skipping them early keeps the printouts happening (indicating the types are unhandled).

Yes, because convert_usd_type_to_blender still returns them but not skipping them early keeps the printouts happening (indicating the types are unhandled).
CharlesWardlaw marked this conversation as resolved

@HooglyBoogly Since Blender has string attributes, would it make sense to also handle converting USD StringArrays? I can't remember if this was discussed in the original attribute import pull request.

@HooglyBoogly Since Blender has string attributes, would it make sense to also handle converting USD StringArrays? I can't remember if this was discussed in the original attribute import pull request.
Member

String attributes are very limited (as in, they have a length limit!) and not well supported right now, I think skipping those is the best approach for now.

String attributes are very limited (as in, they have a length limit!) and not well supported right now, I think skipping those is the best approach for now.
Author
Member

Just to note: string and quaternion attributes were skipped in the original patch due to them not having complete support; the returns are stub-ins for later. I would like to add them both once the support stabilizes in main, and that would be a symmetric import / export update in another patch.

Just to note: string and quaternion attributes were skipped in the original patch due to them not having complete support; the returns are stub-ins for later. I would like to add them both once the support stabilizes in main, and that would be a symmetric import / export update in another patch.
Member

If you'd like to do it later, that's totally fine too! Quaternion attributes are supported in main though.

If you'd like to do it later, that's totally fine too! Quaternion attributes are supported in main though.

@CharlesWardlaw It would be great to get this in for 4.0 as a fix if possible. Some USD files are printing hundreds of thousands of traces to console during import. I've tested this patch with the Moana Island Scene USD (v2.1) data set and can confirm it prevents all console spam except for a tiny few from Warning: Unsupported type double3[] for mesh data

@CharlesWardlaw It would be great to get this in for 4.0 as a fix if possible. Some USD files are printing hundreds of thousands of traces to console during import. I've tested this patch with the Moana Island Scene USD (v2.1) data set and can confirm it prevents all console spam except for a tiny few from `Warning: Unsupported type double3[] for mesh data`

@CharlesWardlaw I think this pull request should merge into the blender-v4.0-release branch and not into main.

@CharlesWardlaw I think this pull request should merge into the `blender-v4.0-release` branch and not into `main`.
Charles Wardlaw changed title from USD: Fix for spammy attribute prints for unsupported and non-array attributes to USD: Fix for spammy attribute prints for unsupported and non-array attributes 2023-10-20 15:44:29 +02:00
CharlesWardlaw changed target branch from main to blender-v4.0-release 2023-10-20 15:44:33 +02:00
Author
Member

@makowalski I modified the pull's target-- please let me know if you need anything further.

@makowalski I modified the pull's target-- please let me know if you need anything further.

@blender-bot build

@blender-bot build
Michael Kowalski approved these changes 2023-10-23 22:15:43 +02:00
Michael Kowalski merged commit 8caee74a11 into blender-v4.0-release 2023-10-24 15:31:19 +02:00
Bastien Montagne removed this from the USD project 2023-11-02 16:14:38 +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 project
No Assignees
4 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#112298
No description provided.