# UsdGeomXformCommonAPI throws Coding Errors due to Attribute Precision

**URL:** https://forum.aousd.org/t/usdgeomxformcommonapi-throws-coding-errors-due-to-attribute-precision/2766
**Category:** USD
**Tags:** cpp, composition
**Created:** [November 10, 2025, 12:20pm UTC](https://forum.aousd.org/t/usdgeomxformcommonapi-throws-coding-errors-due-to-attribute-precision/2766 "2025-11-10T12:20:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![valmiq](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@valmiq](https://forum.aousd.org/u/valmiq)
#### Post date: [November 10, 2025, 12:20pm UTC](https://forum.aousd.org/t/usdgeomxformcommonapi-throws-coding-errors-due-to-attribute-precision/2766/1 "2025-11-10T12:20:11Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)
#### Post date: [November 11, 2025, 7:50pm UTC](https://forum.aousd.org/t/usdgeomxformcommonapi-throws-coding-errors-due-to-attribute-precision/2766/2 "2025-11-11T19:50:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![valmiq](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@valmiq](https://forum.aousd.org/u/valmiq)
#### Post date: [November 17, 2025, 8:37am UTC](https://forum.aousd.org/t/usdgeomxformcommonapi-throws-coding-errors-due-to-attribute-precision/2766/3 "2025-11-17T08:37:06Z")

</div>

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

```auto
// 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

```
