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

Added support for timesamples in xformOps #199

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

rdeioris
Copy link
Contributor

This patch adds support for timeSamples in xformOps.

GetLocalMatrix() and GetGlobalMatrix() can now extract data from asset like this:

def Xform "Top" (
    prepend references = @./top.geom.usd@
)
{
    float xformOp:rotateX:tilt = 12
    float xformOp:rotateZ:precess.timeSamples = {
        1: 0,
        192: 360,
    }
    float xformOp:rotateZ:spin.timeSamples = {
        1: 0,
        192: 1440,
    }
    double3 xformOp:translate:offset = (0, 0.1, 0)

  
    double3 xformOp:translate:vertical.timeSamples = {
        1: (0, 0.1, 0),
        100: (0, 0.1, 10),
        192: (0, 0.5, 5),
    }

    uniform token[] xformOpOrder = ["xformOp:rotateZ:precess", "xformOp:translate:offset", "xformOp:rotateX:tilt", "xformOp:rotateZ:spin", "xformOp:translate:vertical"]
}

Note that GetLocalMatrix() caching system is now enabled only for t == value::TimeCode::Default()

@syoyo
Copy link
Collaborator

syoyo commented Oct 27, 2024

Thanks! Let me give some time to review the PR

@syoyo
Copy link
Collaborator

syoyo commented Oct 28, 2024

described a small review. Others are OK so its ready to merge once that review is resolved.

@rdeioris
Copy link
Contributor Author

Sorry, not sure to understand, do i need to wait for your review or you already did it and i am missing something? Thanks a lot.

@syoyo
Copy link
Collaborator

syoyo commented Oct 28, 2024

IMG_9291

  1. You resolve this pending review(can't find a link to the review) i.e, push a git commit of deleting a comment line
  2. After the pending review has been resolved, the PR will be merged.

@syoyo syoyo merged commit 2a30dd7 into lighttransport:dev Oct 28, 2024
14 checks passed
@syoyo
Copy link
Collaborator

syoyo commented Oct 28, 2024

Thanks! Merged!

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.

2 participants