Autodesk / Autodesk/maya-usd

NurbsCurve floatArray “widths” values always exports as single constant values

Open
#3,018 1 comment 0 reactions 1 assignee Claimed by @santosg87 View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

**Describe the bug**
Upon export of a NurbsCurve with a `widths` floatArray, the data written out is always a single constant value:
```
float[] widths = [1] (
interpolation = "constant"
)
```
Perhaps this makes sense as a default if there is no `widths` on the curve, but not when a multi-valued floatArray data is present.

---
**Steps to reproduce**

1. Open the following [nurbs_curve.ma](https://github.com/Autodesk/maya-usd/files/11207988/nurbs_curve.ma.txt) (uploaded with ".txt" extension)
Note:
- we imported the NurbsCurve into Maya via AL plugin via the example.usa file mentioned on this issue: https://github.com/Autodesk/maya-usd/issues/3017
- we have the correct values on our extra attribute
```
import maya.cmds as cmds
cmds.getAttr("example_curveShape.widths")
# Result: [0.004000000189989805, 0.004000000189989805, 0.00800000037997961, ....
cmds.getAttr("example_curveShape.widths", type=True)
# Result: floatArray
```

2. Export with root selected
![image](https://user-images.githubusercontent.com/130536928/231372744-d71cff1e-914e-4a01-a23d-3faa361d8faa.png)

```
export_options = {
"selection": True,
'file': "export_path.usda",
}
cmds.mayaUSDExport(**export_options)
```

3. The exported usda will have:
```
float[] widths = [1] (
interpolation = "constant"
)
```
---

**Expected behavior**
For the width floatArray values to carry over to exported.

**Specs (if applicable):**
- Linux Centos 7.8
- Maya 2023.2.0-11.0.PFIX
- MayaUSD v0.23.0
- USD v21.8

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.