Access Background scene via Python?


Background scene set via the menu above works really well for a skydome. But is there a way to access that scene via Python during runtime?

It doesn’t seem to appear in getSceneList() anymore.

If it doesn’t appear on the scene list and logic bricks doesn’t work there (I don’t know) then maybe you should use an underlay scene instead.

Too bad…would have been perfect for skydomes :slight_smile:
Using overlay/underlying scenes are annoying since they don’t rotate with the player view…you have to sync the rotation of the sky scene manually via Python and there’s a very small delay on that.

not exactly sure if im reading this correctly but I can still access background scenes with python. I access it with the scene list in an init and assign a global variable to it. Done


if not 'init' in own:
      global otherscene 
      otherscene = [i for i in logic.getSceneList() if i.name == "otherscene"][0]
      own["init"] = 1

That works if you add an overlay/underlay scene via python or logic blocks…but the menu I showed above doesn’t make the scene appear in any list…
BUT, behold…I noticed that the Background scene set in the Background menu slot gets actually added in to the same main scene…so I can just access the objects via scene.objects…bleh :slight_smile: This is nice!

https://blenderartists.org/forum/showthread.php?398744-Set-one-camera-s-rotation-to-be-equal-to-another-scene-s-camera-s-rotation&p=3048932&viewfull=1#post3048932 might help

Thats a neat trick trick to get rid of the delay monter