rollout LightTool "VRay灯光控制" width:192 height:309
(
groupBox AllLight "全部灯光" pos:[16,16] width:77 height:160
button TurnOnAllLight "开灯" pos:[24,32] width:60 height:25
button TurnOffAllLight "关灯" pos:[24,72] width:60 height:25
groupBox grp2 "所选灯光" pos:[101,16] width:72 height:160
button TurnOnSelectedLight "开灯" pos:[107,32] width:60 height:25
button TurnOffSelectedLight "关灯" pos:[107,72] width:60 height:25
groupBox grp3 "" pos:[8,8] width:176 height:256
groupBox grp4 "灯光强度控制" pos:[16,184] width:160 height:72
button ShowAllLight "显示" pos:[24,107] width:60 height:25
button HideAllLight "隐藏" pos:[24,142] width:60 height:25
button HideSelectedLight "隐藏" pos:[107,104] width:60 height:64
label lbl1 "改动前:" pos:[32,200] width:56 height:16
editText edt1 "" pos:[96,200] width:70 height:16 enabled:false
spinner mu "" pos:[104,224] width:62 height:16 range:[0,2000,1] type:#float scale:1
label lbl2 "当前值:" pos:[32,224] width:56 height:16
label lbl3 "VRay灯光控制工具" pos:[61,279] width:123 height:19
/*在脚本载入时文本框显示已经选择的灯光的倍增值*/
on LightTool open do
(
for x in selection do
if superclassof x==light then
edt1.text=x.multiplier as string
)
on TurnOnAllLight pressed do
(
for x in lights where classof x!=targetobject do
x.on=true
)
on TurnOffAllLight pressed do
(
for x in lights where classof x!=targetobject do
x.on=false
)
on TurnOnSelectedLight pressed do
(
for x in selection do
if superclassof x==light then
x.on=true
else
messagebox "你选择的不是灯光" title:"提示"
)
on TurnOffSelectedLight pressed do
(
for x in selection do
if superclassof x==light then
x.on=false
else
messagebox "你选择的不是灯光" title:"提示"
)
on ShowAllLight pressed do
unhide lights
on HideAllLight pressed do
hide lights
on HideSelectedLight pressed do
(
for x in selection do
if superclassof x==light then
hide x
else
messagebox "你选择的不是灯光" title:"提示"
)
on mu changed val do
(
for x in selection do
if superclassof x==light then
x.multiplier=mu.value
)
)
createdialog LightTool
(
groupBox AllLight "全部灯光" pos:[16,16] width:77 height:160
button TurnOnAllLight "开灯" pos:[24,32] width:60 height:25
button TurnOffAllLight "关灯" pos:[24,72] width:60 height:25
groupBox grp2 "所选灯光" pos:[101,16] width:72 height:160
button TurnOnSelectedLight "开灯" pos:[107,32] width:60 height:25
button TurnOffSelectedLight "关灯" pos:[107,72] width:60 height:25
groupBox grp3 "" pos:[8,8] width:176 height:256
groupBox grp4 "灯光强度控制" pos:[16,184] width:160 height:72
button ShowAllLight "显示" pos:[24,107] width:60 height:25
button HideAllLight "隐藏" pos:[24,142] width:60 height:25
button HideSelectedLight "隐藏" pos:[107,104] width:60 height:64
label lbl1 "改动前:" pos:[32,200] width:56 height:16
editText edt1 "" pos:[96,200] width:70 height:16 enabled:false
spinner mu "" pos:[104,224] width:62 height:16 range:[0,2000,1] type:#float scale:1
label lbl2 "当前值:" pos:[32,224] width:56 height:16
label lbl3 "VRay灯光控制工具" pos:[61,279] width:123 height:19
/*在脚本载入时文本框显示已经选择的灯光的倍增值*/
on LightTool open do
(
for x in selection do
if superclassof x==light then
edt1.text=x.multiplier as string
)
on TurnOnAllLight pressed do
(
for x in lights where classof x!=targetobject do
x.on=true
)
on TurnOffAllLight pressed do
(
for x in lights where classof x!=targetobject do
x.on=false
)
on TurnOnSelectedLight pressed do
(
for x in selection do
if superclassof x==light then
x.on=true
else
messagebox "你选择的不是灯光" title:"提示"
)
on TurnOffSelectedLight pressed do
(
for x in selection do
if superclassof x==light then
x.on=false
else
messagebox "你选择的不是灯光" title:"提示"
)
on ShowAllLight pressed do
unhide lights
on HideAllLight pressed do
hide lights
on HideSelectedLight pressed do
(
for x in selection do
if superclassof x==light then
hide x
else
messagebox "你选择的不是灯光" title:"提示"
)
on mu changed val do
(
for x in selection do
if superclassof x==light then
x.multiplier=mu.value
)
)
createdialog LightTool