When /adaptive_mesh/materials/transfer_time is set to on_demand, materials aren't transferred from pixels to elements until this function is executed. Any assignments made with /adaptive_mesh/materials/set will be lost.