Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[usdGeom] added support for indexed uint primvar values #861

Merged
merged 1 commit into from
Jun 25, 2019
Merged

[usdGeom] added support for indexed uint primvar values #861

merged 1 commit into from
Jun 25, 2019

Conversation

AlexSchwank
Copy link
Contributor

Description of Change(s)

Added support for indexed primvar values of type uint[].

testUsdGeomPrimvar.py could be extended to include a test for this in test_PrimvarsAPI() but not sure if that's necessary.

# make sure UIntArray can be used for indexed primvar values
uint_array = gp_pv.CreatePrimvar('uint_array', Sdf.ValueTypeNames.UIntArray)
uint_values = Vt.UIntArray([3, 1, 4])
uint_array.Set(uint_values)
indices = Vt.IntArray([0, 1, 2, 1, 2, 0])
uint_array.SetIndices(indices)
self.assertFalse(uint_array.ComputeFlattened() is None)

@spiffmon
Copy link
Member

spiffmon commented May 31, 2019 via email

@AlexSchwank
Copy link
Contributor Author

The alembic issues are with the index arrays. But this PR doesn't fix that. It adds support for uint[] for the value arrays. Is that a problem for you too?

@AlexSchwank AlexSchwank changed the title added support for indexed uint primvar values [usdGeom] added support for indexed uint primvar values May 31, 2019
@spiffmon
Copy link
Member

Sorry, @AlexSchwank - I phoned that in without looking at the change. Given that at least Katana pxrUsdIn handles uint primvar arrays (lossily, as it does VtArray...), this change seems fine to me.

@AlexSchwank
Copy link
Contributor Author

No worries, too many similar uint tickets :)
Great, thanks.

@jilliene
Copy link

jilliene commented Jun 6, 2019

Filed as internal issue #USD-5347

@pixar-oss pixar-oss merged commit 7f21426 into PixarAnimationStudios:dev Jun 25, 2019
pixar-oss added a commit that referenced this pull request Jun 25, 2019
[usdGeom] added support for indexed uint primvar values

(Internal change: 1979080)
@AlexSchwank AlexSchwank deleted the pr/uintArray_primvars branch November 7, 2019 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants