diff options
author | Paul Golter <paulgolter> | 2021-12-01 16:58:16 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-12-01 16:58:49 +0300 |
commit | fd8418385c2e3b0cc9ff8a254c3f3e408d0565f9 (patch) | |
tree | 5317424ec59a470ebba0a2a99a2209fe6d4ee31a /source/blender/makesdna | |
parent | 1ef8ef4941dd84c8968109b5c858ed8d082d9187 (diff) |
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
Diffstat (limited to 'source/blender/makesdna')
0 files changed, 0 insertions, 0 deletions