unreal engine 5.2 VR bake and blueprints

I’m working on a VR project that runs from a PC. We’ve realized that we can’t use Lumen, so we need to render our project (bake lighting). My question is how to create a Blueprint function to change objects or materials, taking into account the need for baking. Without baking, the material turns black

I hope I understand the question. Meshes placed in a blueprint have their mobility set to mobile. Simply set the mesh to static. Save the blueprint. Then you can bake lighting for them. You can also set the entire blueprint (root) to static. All meshes should get their mobility from the parent (root).