Version: 2.79b (linux 64)
How to reproduce:
- Open the file active_scene_api.blend and inspect the embedded python script.
- Close blender.
- Open the same file from the command line and execute the script like so: blender -b active_scene_api.blend --python-text "active_scene.py"
- Observe the output from the script.
- Now do the same, but change the scene using the scene argument: blender -b active_scene_api.blend -S "Scene B" --python-text "active_scene.py"
- Note how it does not print the current active scene name, but instead prints whatever the active scene was when the file was saved.
This can cause errors and unexpected behavior with render scripts.