Blender Git Commit Log
Git Commits -> Revision d604114
Revision d604114 by Paul Golter (lineart-shadow) December 8, 2021, 06:51 (GMT) |
Add layer and pass index parameters to rna_Image_gl_load This patch adds a layer_idx and pass_idx parameter to the rna_Image_gl_load function. It exposes both to the Python API as optional parameters. This allows python scripters to specifiy which layer and pass they want to load in to an OpenGL texture. Right now image.gl_load() always takes the first layer and first pass. This is limiting when working with multilayer openEXRs. With this patch scripters can do something like this: ``` pass_idx = area.spaces.active.image_user.multilayer_pass layer_idx = area.spaces.active.image_user.multilayer_layer image.gl_load(frame=0, layer_idx=layer_idx, pass_idx=pass_idx) ``` As the parameters are optional and default to 0, it should not break existing code. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D13435 |
Commit Details:
Full Hash: d6041143855b029794a33c116861629f4a972d01
Parent Commit: b84b348
Committed By: YimingWu
Lines Changed: +46, -3
1 Modified Path:
/source/blender/makesrna/intern/rna_image_api.c (+46, -3) (Diff)