Hello I would like to have the studio light strength change from 1 to 0 when entering a new scene. I assume that this is achievable via python, but what would the required script be? Thanks.
1 Answer
you can try this code here:
import bpy
space = None
for a in bpy.context.screen.areas:
if a.type == "VIEW_3D":
for s in a.spaces:
s.shading.studiolight_intensity = 0.15203
just as a hint how you can "see" what the command is: open the console, change the strength and you see the command in the console ;)
-
$\begingroup$ Hello, when I connect this script to a keyboard sensor (e.g. press G to activate) and press P to run the game, when I press G it has no effect real-time, but shows the effect after pressing Esc and returning to the viewport. Is there a method for this working real-time? Thanks. $\endgroup$– MinatoMay 8, 2022 at 15:54
-
$\begingroup$ i think in game you would have to change the background color.....this is "just" viewport shading, not rendered result $\endgroup$– ChrisMay 8, 2022 at 15:58
-
-