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

Add bookmarks menu to CyclesShaderUI.py #5602

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Add bookmarks menu to CyclesShaderUI.py #5602

merged 1 commit into from
Jan 2, 2024

Conversation

BrianHanke
Copy link
Contributor

Following up on our earlier chat, I found that the Cycles image texture file picker needed a bookmark menu as well.

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.

Thanks Brian, and congrats on your first PR! I'll leave it up to you how to resolve my question about tx in the extensions list, as long as it is included one way or another.

It would be great if you could also update Changes.md to include a comment in the Improvements section, similar to the one we added when doing this for Arnold.

As it stands, this PR will be merged to main only, which means it will only appear in Gaffer 1.4. If you'd like it in 1.3 then let us know and I can rejig it appropriately.

Cheers...
John

__metadata[paramPath]["path:leaf"] = True
__metadata[paramPath]["path:valid"] = True
__metadata[paramPath]["path:bookmarks"] = "texture"
__metadata[paramPath]["fileSystemPath:extensions"] = "exr tif tiff hdr jpg jpeg png"
Copy link
Member

Choose a reason for hiding this comment

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

When I did the equivalent for Arnold, I only included the tx extension, to encourage folks to use properly mip-mapped textures. Perhaps it's worth doing the same here? Or perhaps at the very least we could include tx in this list? I think Cycles uses OIIO for image loading, so if we wanted a complete list we could get it from GafferImageImageReader.supportedExtensions().

@BrianHanke
Copy link
Contributor Author

Thanks @johnhaddon! I updated it to use supportedExtensions() and that seems to be working well. The browser is showing jpg, exr, tx, etc now. I also added Changes.md, hope the syntax is correct.

@johnhaddon johnhaddon changed the base branch from main to 1.3_maintenance January 2, 2024 14:44
Following up on our earlier chat, I found that the Cycles texture file picker needed a bookmark menu as well.
@johnhaddon johnhaddon merged commit 9b022cc into GafferHQ:1.3_maintenance Jan 2, 2024
1 of 4 checks passed
@johnhaddon
Copy link
Member

Thanks Brian! I've merged this to the 1.3_maintenance branch, so it will appear in Gaffer 1.3.10.0. For future reference, I moved the content of your additional python/GafferCyclesUI/Changes.md into the main Changes.md (we just manage a single file for changes, not one per directory).

@BrianHanke
Copy link
Contributor Author

Great, thank you! I'll remember that for next time.

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.

None yet

2 participants