USD: Enable 'quatf' Primvar types during Import

Importing USD `quatf` types was erroneously left disabled after recent
work this past summer for better attribute support. It is already
correctly enabled and validated for Export.

The `half` and `double` variants must still be skipped for now though.

Pull Request: https://projects.blender.org/blender/blender/pulls/132252
This commit is contained in:
Jesse Yurkovich
2024-12-22 23:02:41 +01:00
committed by Jesse Yurkovich
parent eac1ade956
commit 9ebb73070d
2 changed files with 4 additions and 5 deletions

View File

@@ -696,7 +696,6 @@ void USDMeshReader::read_custom_data(const ImportSettings *settings,
if (ELEM(type,
pxr::SdfValueTypeNames->StringArray,
pxr::SdfValueTypeNames->QuatfArray,
pxr::SdfValueTypeNames->QuatdArray,
pxr::SdfValueTypeNames->QuathArray))
{

View File

@@ -1173,7 +1173,7 @@ class USDImportTest(AbstractUSDTest):
# Verify all attributes on the Mesh
# Note: USD does not support signed 8-bit types so there is
# currently no equivalent to Blender's INT8 data type
# TODO: Blender is missing support for reading USD quat/matrix data types
# TODO: Blender is missing support for reading USD matrix data types
mesh = bpy.data.objects["Mesh"].data
self.check_attribute(mesh, "p_bool", 'POINT', 'BOOLEAN', 4)
@@ -1184,7 +1184,7 @@ class USDImportTest(AbstractUSDTest):
self.check_attribute(mesh, "p_color", 'POINT', 'FLOAT_COLOR', 4)
self.check_attribute(mesh, "p_vec2", 'CORNER', 'FLOAT2', 4) # TODO: Bug - wrong domain
self.check_attribute(mesh, "p_vec3", 'POINT', 'FLOAT_VECTOR', 4)
self.check_attribute_missing(mesh, "p_quat")
self.check_attribute(mesh, "p_quat", 'POINT', 'QUATERNION', 4)
self.check_attribute_missing(mesh, "p_mat4x4")
self.check_attribute(mesh, "f_bool", 'FACE', 'BOOLEAN', 1)
@@ -1195,7 +1195,7 @@ class USDImportTest(AbstractUSDTest):
self.check_attribute(mesh, "f_color", 'FACE', 'FLOAT_COLOR', 1)
self.check_attribute(mesh, "f_vec2", 'FACE', 'FLOAT2', 1)
self.check_attribute(mesh, "f_vec3", 'FACE', 'FLOAT_VECTOR', 1)
self.check_attribute_missing(mesh, "f_quat")
self.check_attribute(mesh, "f_quat", 'FACE', 'QUATERNION', 1)
self.check_attribute_missing(mesh, "f_mat4x4")
self.check_attribute(mesh, "fc_bool", 'CORNER', 'BOOLEAN', 4)
@@ -1207,7 +1207,7 @@ class USDImportTest(AbstractUSDTest):
self.check_attribute(mesh, "displayColor", 'CORNER', 'FLOAT_COLOR', 4)
self.check_attribute(mesh, "fc_vec2", 'CORNER', 'FLOAT2', 4)
self.check_attribute(mesh, "fc_vec3", 'CORNER', 'FLOAT_VECTOR', 4)
self.check_attribute_missing(mesh, "fc_quat")
self.check_attribute(mesh, "fc_quat", 'CORNER', 'QUATERNION', 4)
self.check_attribute_missing(mesh, "fc_mat4x4")
# Find the non "bezier" Curves object -- Has 2 curves (12 vertices each)