- User Since
- Mar 1 2018, 10:59 AM (163 w, 4 d)
Mar 14 2018
I think the issue was with render_get_active_layer() looking up re->r.actlay in rr->layers (maybe as an optimisation?). Since rr->layers only contains the rendered layers, it sometimes returns the wrong layer when not layers are rendered. Also sima->iuser.layer did not always get updated because of the layer != rj->last_layer condition...
Ah...right. I did try doing nothing in render_image_restore_layer(), but for some reason, sima->iuser.layer is not always the right value before all render layers are rendered. I think it is because rr->renlay->name, which is used to look up the layer index, sometimes gets set to a previous layer's name (though somehow, the layer name being looked up is correct while rendering). Also, currently sima->iuser.layer is never set to 0, since it is only set when layer != rj->last_layer, and rj->last_layer is always 0...
Mar 13 2018
Thanks for the feedback!
Mar 9 2018
Mar 8 2018
Yes, I think iuser->layer should be automatically set to the active render layer when "Only render active layer" is enabled. This means changing render_image_restore_layer() behavior.
Mar 6 2018
Hi there, I'm new to this, but I've been poking around with this bug to find my way around. From what I gather, the displayed render-layer is affected by the value of ‘iuser->layer’ in ‘uiblock_layer_pass_buttons’, which displays the rendered layer corresponding to the index of ‘iuser->layer’. It's set to 1 initially, so when multiple layers are rendered consecutively, it keeps displaying the second layer in the rendered stack. (If there isn't a layer at that index, it'll just display the closest one.) If you select a different layer to be displayed in the image editor, ‘iuser->layer’ is properly updated to that layer's index, and then it'll keep displaying the render layer at that index until you set another layer.