ifindex>-1andopts.save_selected_onlyandlen(images)>1and(index>0ornotopts.return_grid):# ensures we are looking at a specific picture, we have save_selected_only, and there's more than a single image (for correct seed logging in case of return_grid)
ifindex>-1andopts.save_selected_onlyand(index>0ornotopts.return_grid):# ensures we are looking at a specific non-grid picture, and we have save_selected_only