diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-04-28 13:59:23 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-04-28 18:06:53 +0300 |
commit | 475bd6b829c38966b0fd4fdaff2eb61cc71c46c4 (patch) | |
tree | 58b90891316b4a1b5c4f3a7193b4f8358a1f801c /source/blender/editors/space_image | |
parent | 37e08e526c6fef7d0a4fc359bc4b7e665d012119 (diff) |
Fix T76179: Unable to select render passes when a render has fewer
passes than one in another slot
If a particular pass is not available in a slot we are switching to,
still show the menu, but with a blank name for the currently selected
item so that the user can change it to a valid value.
thx @brecht for providing the standard way Blender deals with these
kinds of situations.
Maniphest Tasks: T76179
Differential Revision: https://developer.blender.org/D7552
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 3658ebae3a2..fcd6baa9582 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -656,8 +656,8 @@ static void uiblock_layer_pass_buttons( /* pass */ rpass = (rl ? BLI_findlink(&rl->passes, iuser->pass) : NULL); - if (rpass && RE_passes_have_name(rl)) { - display_name = rpass->name; + if (RE_passes_have_name(rl)) { + display_name = rpass ? rpass->name : ""; rnd_pt = ui_imageuser_data_copy(&rnd_pt_local); but = uiDefMenuBut(block, ui_imageuser_pass_menu, |