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

OSL indexed context queries #5515

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

ericmehl
Copy link
Collaborator

@ericmehl ericmehl commented Oct 26, 2023

This adds the ability to query specific indices of a vector-typed context variable in OSL. The original motivation was querying the scene:path context variable as described in #5292. The method was simple to generalize for all supported vector types, so those can be queried by index too.

I'm opening this now as a work-in-progress so I can mention this PR in a related Cortex PR. There are still a couple things left to do before it's ready for review.

Related issues

Fixes #5292

Dependencies

ImageEngine/cortex#1391

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.

Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

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

There are still a couple things left to do before it's ready for review.

Doh! Sorry, I reviewed this a bit too eagerly. Posting my comments now anyway in case they might be useful...

src/GafferOSL/OSLExpressionEngine.cpp Outdated Show resolved Hide resolved
shaders/GafferOSL/Expression.h Outdated Show resolved Hide resolved
python/GafferOSLTest/OSLExpressionEngineTest.py Outdated Show resolved Hide resolved
@ericmehl
Copy link
Collaborator Author

ericmehl commented Nov 2, 2023

I addressed the comments and pushed a new branch this morning. Looks like the test failure is the expected one of handling InternedStringVectorData in DataView that was fixed in ImageEngine/cortex#1391.

Changes.md Outdated Show resolved Hide resolved
@johnhaddon johnhaddon marked this pull request as ready for review November 3, 2023 12:31
@johnhaddon
Copy link
Member

Rebased to squash fixups and get this on top of #5525, whereafter CI should pass.

@ericmehl
Copy link
Collaborator Author

ericmehl commented Nov 3, 2023

And one last rebase to fix changes.md conflicts...

@johnhaddon johnhaddon merged commit 58022a8 into GafferHQ:1.3_maintenance Nov 3, 2023
3 of 4 checks passed
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