Autodesk / Autodesk/maya-usd

NurbsCurve import not supported

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

Description

**Describe the bug**
Importing a usd file with NurbsCurve shape imports as empty transform (i.e unsupported)

---

**Steps to reproduce**
[example.usda](https://github.com/Autodesk/maya-usd/files/11207823/example.usda.txt)

```
#usda 1.0
(
defaultPrim = "root"
)

def Xform "root"
{
uniform token[] xformOpOrder = []

def NurbsCurves "example_curve"
{
int[] curveVertexCounts = [27]
float3[] extent = [(0.14185347, 17.896757, 0.8815634), (0.48007512, 18.159557, 0.96805495)]
double[] knots = [0, 0, 0, 0.041666666665, 0.08333333333333334, 0.125000000015, 0.16666666666666669, 0.20833333334999998, 0.25000000000000006, 0.29166666664999996, 0.33333333333333337, 0.375, 0.4166666666666667, 0.45833333335000004, 0.5, 0.5416666666500001, 0.5833333333333334, 0.625, 0.6666666666666667, 0.7083333333499999, 0.7500000000000001, 0.7916666666500001, 0.8333333333333335, 0.875, 0.9166666666666669, 0.9583333333499999, 1, 1, 1]
int[] order = [4]
point3f[] points = [(0.14185347, 18.013659, 0.935313), (0.1440977, 18.02514, 0.939451), (0.15173617, 18.047596, 0.9446796), (0.16929285, 18.079283, 0.94920266), (0.18956088, 18.108482, 0.95594615), (0.21467458, 18.13271, 0.9625606), (0.24667569, 18.149364, 0.96680486), (0.28372964, 18.158363, 0.96805495), (0.32332093, 18.159557, 0.96666265), (0.36106777, 18.151793, 0.96278065), (0.39292985, 18.133791, 0.9543705), (0.422169, 18.11446, 0.93848354), (0.45026538, 18.084795, 0.9190634), (0.46606445, 18.050987, 0.9014011), (0.48007512, 18.019842, 0.8826245), (0.47025555, 17.996298, 0.8815634), (0.45047554, 17.96001, 0.901457), (0.41773456, 17.929466, 0.9207907), (0.38346905, 17.909672, 0.93741375), (0.3496207, 17.899744, 0.9493709), (0.31186676, 17.896757, 0.95646256), (0.27264524, 17.898874, 0.95930445), (0.23509347, 17.909391, 0.9573396), (0.20057097, 17.92729, 0.9535431), (0.16983986, 17.953781, 0.94717443), (0.15162319, 17.97215, 0.944814), (0.14271961, 17.981373, 0.94314736)]
custom float[] primvars:curveID = [264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290] (
interpolation = "vertex"
)
custom float[] primvars:length = [0, 0.012409729, 0.036698032, 0.07320484, 0.109383345, 0.14489958, 0.18122412, 0.21937564, 0.2590094, 0.29774165, 0.33529133, 0.3737752, 0.41901416, 0.46030012, 0.49927288, 0.5248049, 0.5706718, 0.6194439, 0.6623656, 0.6996113, 0.7381415, 0.7775228, 0.816569, 0.8556404, 0.89671034, 0.9226885, 0.9356151] (
interpolation = "vertex"
)
point3f[] primvars:pref = [(0.14185347, 18.013659, 0.935313), (0.1440977, 18.02514, 0.939451), (0.15173617, 18.047596, 0.9446796), (0.16929285, 18.079283, 0.94920266), (0.18956088, 18.108482, 0.95594615), (0.21467458, 18.13271, 0.9625606), (0.24667569, 18.149364, 0.96680486), (0.28372964, 18.158363, 0.96805495), (0.32332093, 18.159557, 0.96666265), (0.36106777, 18.151793, 0.96278065), (0.39292985, 18.133791, 0.9543705), (0.422169, 18.11446, 0.93848354), (0.45026538, 18.084795, 0.9190634), (0.46606445, 18.050987, 0.9014011), (0.48007512, 18.019842, 0.8826245), (0.47025555, 17.996298, 0.8815634), (0.45047554, 17.96001, 0.901457), (0.41773456, 17.929466, 0.9207907), (0.38346905, 17.909672, 0.93741375), (0.3496207, 17.899744, 0.9493709), (0.31186676, 17.896757, 0.95646256), (0.27264524, 17.898874, 0.95930445), (0.23509347, 17.909391, 0.9573396), (0.20057097, 17.92729, 0.9535431), (0.16983986, 17.953781, 0.94717443), (0.15162319, 17.97215, 0.944814), (0.14271961, 17.981373, 0.94314736)] (
interpolation = "vertex"
)
float primvars:totalLength = 0.9356151 (
interpolation = "constant"
)
double2[] ranges = [(0, 1)]
float[] widths = [0.004, 0.004, 0.008, 0.008, 0.01, 0.009, 0.008, 0.006, 0.004, 0.007, 0.008, 0.007, 0.007, 0.006, 0.006, 0.009, 0.01, 0.007, 0.01, 0.01, 0.011, 0.006, 0.011, 0.011, 0.009, 0.009, 0.003]
uniform token[] xformOpOrder = []
}

}
```

1. import the above example.usda
```
filepath = "example.usda"
cmds.mayaUSDImport(f=filepath, readAnimData=False)
```
2. Note “example_curve” is empty transform
![image](https://user-images.githubusercontent.com/130536928/231367449-d4f908f6-209e-4aeb-85db-a6582b997401.png)

---
**Expected behavior**
After the import, the “example_curve” to have a NurbsCurve shape
![image](https://user-images.githubusercontent.com/130536928/231367739-8bfb2836-56c5-4306-9a41-a1593191fedf.png)

**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.