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

Updated NURBS curve export for widths and knots attributes #2326

Merged
merged 4 commits into from
May 11, 2022

Conversation

jonjondev
Copy link
Contributor

This PR aims to continue the alignment between the AL and ADSK plugins' export functionality, updating the ADSK plugin's NURBS curve export of knots to avoid adding extra knots in non-wrapping curves (i.e. do not copy the first and last knots in the exported vector). The PR also adds a simple implementation for the widths attribute as lifted from the AL plugin's NURBS curve export translator in favour of just authoring a constant widths vector of [1].

@jonjondev
Copy link
Contributor Author

Looks like it's building and passing tests. macOS failing with:

/lib/usd/translators/nurbsCurveWriter.cpp:205:53
error: lambda capture 'mayaKnotsCount' is not used [-Werror,-Wunused-lambda-capture]
        auto copyKnots = [&mayaCurveKnots, &curveKnots, mayaKnotsCount](size_t from, size_t to) {

Seems that Clang is just being fussy about warnings. I'll have a fix up in the morning (Sydney time), but should be reviewable.

@fabal fabal force-pushed the J-Mo63/nurbs-align-knots-widths branch from 1206d7b to b8e70a0 Compare May 4, 2022 00:31
@jonjondev jonjondev requested a review from williamkrick May 5, 2022 00:24
@seando-adsk seando-adsk added import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge labels May 10, 2022
@seando-adsk seando-adsk merged commit e6347a7 into Autodesk:dev May 11, 2022
@jonjondev jonjondev deleted the J-Mo63/nurbs-align-knots-widths branch May 11, 2022 14:59
@michaeljefferies
Copy link

The comment at the top says "updating the ADSK plugin's NURBS curve export of knots to avoid adding extra knots in non-wrapping curves (i.e. do not copy the first and last knots in the exported vector)", but according to the USD documentation there should be extra knots for both periodic and non-periodic curves: https://graphics.pixar.com/usd/dev/api/class_usd_geom_nurbs_curves.html#details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants