返回或修改一个聚光灯的阴影强度。
rhinoscriptsyntax.SpotLightShadowIntensity (object_id, intensity=None)
rhinoscript.light.SpotLightShadowIntensity (object_id, intensity=None)
object_id |
必须参数。字符串或 Guid。灯光物件的 ID 。 |
intensity |
可选参数。数字。新的阴影强度。聚光灯的阴影强度范围在 0.0 到 1.0 之间。如果设置为 0.0,聚光灯将不会产生阴影。如果设置为 1.0,聚光灯投射黑色阴影。如果省略,返回当前的阴影强度。 |
数字 |
如果没有指定 intensity 参数,返回当前的阴影强度。 |
数字 |
如果指定了 intensity 参数,返回先前的阴影强度。 |
import rhinoscriptsyntax as rs
id = rs.GetObject("Select a light", rs.filter.light)
if id: rs.SpotLightShadowIntensity(id, 0.75)