Page MenuHome

Fix T76179: Unable to select render passes when a render has fewer passes than one in another slot
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Apr 28 2020, 1:03 PM.

Details

Summary

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 Van Lommel (brecht) for providing the standard way Blender deals with these
kinds of situations.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Apr 28 2020, 1:03 PM

The standard way Blender deals with this situation is to show the menu, but with a blank name for the currently selected item so that the user can change it to a valid value.

Changing iuser->pass should not be done in drawing code.

@Philipp Oeser (lichtwerk) I don't know if this will impact on your patch but I thought I would add it because you said:

If a particular pass is not available in a slot we are switching to, take the last available instead.

At the moment it seems Blender doesn't match render passes when switching between slots. So switching from slot 1 to 2 will not always show you the depth pass for example, if the order that the render passes displayed in the drop down are different between each slot.

For example, here's two render pass drop downs. In it's current state if I select "gloss direct" on slot 1 and switch to slot 2, it will display "diffuse direct" as both are in the third spot in the passes list.

This is an entirely different issue in it self and will probably need to be discussed in a different report/patch.

show blank menu instead of switching the pass selector

@Philipp Oeser (lichtwerk) I don't know if this will impact on your patch but I thought I would add it because you said:

If a particular pass is not available in a slot we are switching to, take the last available instead.

At the moment it seems Blender doesn't match render passes when switching between slots. So switching from slot 1 to 2 will not always show you the depth pass for example, if the order that the render passes displayed in the drop down are different between each slot.

For example, here's two render pass drop downs. In it's current state if I select "gloss direct" on slot 1 and switch to slot 2, it will display "diffuse direct" as both are in the third spot in the passes list.

This is an entirely different issue in it self and will probably need to be discussed in a different report/patch.

Yep, that is based on numbers/index...

This revision is now accepted and ready to land.Apr 28 2020, 1:48 PM