UsdGeomXformCommonAPI throws Coding Errors due to Attribute Precision

I realized the UsdGeomXformCommonAPI throws Coding Errors if there is a composed reference that has different float/double precision in its transform operators. For example, if the USD scale was defined as double, since common API expects it as a float, it will say:

Coding Error (secondary thread): in AddXformOp at line 208 of W:\aed3087ace93e092\USD\pxr\usd\usdGeom\xformable.cpp – XformOp </World/Cube.xformOp:scale> has typeName ‘double3’ which does not match the requested precision ‘PrecisionFloat’. Proceeding to use existing typeName / precision.
*
And will return false when I xformAPI.SetXformVectors(
…)*

I think this is a bug, because that forces me to manually set the operators instead of directly applying the common API for this. And since composition arcs cannot override types, I have to check for each xform op precision, etc.

Thanks in advanced!

Hi @valmiq - can you confirm whether, in this scenario, the bool operator for the schema returns true or false for the prim in question?

@spiff I confirm it returns true the bool operator of the schema

// Standard approach - throws warnings if prim don't match with expected value precision.

pxr::UsdGeomXformCommonAPI xformAPI(prim);
bool valid = (bool)xformAPI; // TRUE
bool success = xformAPI.SetXformVectors(translation, rotation, scale, pivot, rotOrder, pxr::UsdTimeCode::Default()); // FALSE!!! Though it applies it with a slow bunch of warnings