判断灯光物件是否为平行光。
rhinoscriptsyntax.IsDirectionalLight (object_id)
rhinoscript.light.IsDirectionalLight (object_id)
object_id |
必须参数。字符串或 Guid。灯光物件的 ID 。 |
布尔值 |
如果执行成功,返回 True,如果执行不成功返回 False。 |
import rhinoscriptsyntax as rs
id = rs.GetObject("Select a light", rs.filter.light)
if rs.IsDirectionalLight(id):
print "The object is a directional light."
else:
print "The object is not a directional light."
AddDirectionalLight