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

Improve UsdSkel docs #2697

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

mati-nvidia
Copy link
Contributor

Description of Change(s)

  • Fix UsdSkel docs code/usda samples.
  • Add more info to UsdSkel docs for clarity.

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

- Fix UsdSkel docs code/usda samples.
- Add more info to UsdSkel docs for clarity.

Signed-off-by: mati-nvidia <mcodesal@nvidia.com>

UsdSkelBindingAPI binding = UsdSkelBindingAPI::Apply(skel.GetPrim());
binding.CreateSkeletonRel().SetTargets(
binding.CreateAnimationSourceRel().SetTargets(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be wrong, but I believe the repeated section of code down near line 1081 needs to be updated to use CreateAnimationSourceRel() instead of CreateSkeletonRel() as you did here (and similarly for the Python snippet). I'm working on merging this change in, so I'll update accordingly on my end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I missed the fix in the breakdown section. I went ahead and updated it in a new commit along with another suggestion from Spiff on the AOUSD forum.

}
def Skeleton "Skel" {
uniform token[] = ["A/B", "A"]
uniform token[] = ["A", "A/B"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to correctly list parent joints before child joints in the Skeleton. Switched the order in SkelAnimation too just to still show that the joint order can be different between the two prims.

@@ -530,12 +536,51 @@ using the UsdSkelBindingAPI. The _jointIndices_ primvar provides an array giving
the joint index of an influence, while the _jointWeights_ primvar provides a
weight value corresponding to each of those indices.

For example:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a missing example. I made it up based on the explanation paragraph below.

@@ -12,7 +12,10 @@ def SkelRoot "Model" (
prepend apiSchemas = ["SkelBindingAPI"]
)
{
def Skeleton "Skel" {
def Skeleton "Skel" (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix for new strict applied schemas.

bool
WriteAnimatedSkel(
const UsdStagePtr& stage,
const SdfPath& skelPath,
const SdfPath& skelRootPath,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be good to include SkelRoot in this example.

@@ -218,19 +218,25 @@ as the authored _joints_ array. The effect of a skel animation prim may
also be directly nullified by either deactivating the primitive, or by blocking
the component attributes.

\subsection UsdSkel_SkelAnimation_Blendshapes Skel Animation Schema: Blend Shape Animation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New subsection. Just better for scannability and linking.

@jesschimein
Copy link

Filed as internal issue #USD-8711

@pixar-oss pixar-oss merged commit b87a1e9 into PixarAnimationStudios:dev Dec 11, 2023
3 of 5 checks passed
This pull request was closed.
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.

4 participants