universal reflection control help
trying to create a universal reflection control for a arch-design material
here is what i have got, any help would be great, cheers :-
try(destroydialog ::weeevel)catch()
(
rollout weeevel "Universal Reflect" width:161 height:140
(
spinner dist "Reflect weight" pos:[22,31] width:116 height:16 enabled:true range:[0,100,0]
spinner samples "Reflect samples" pos:[22,52] width:116 height:16 enabled:true range:[0,100,0]
button Enable "Enable refl" pos:[19,81] width:116 height:20
on Enable pressed do
for a in objects do
(
(
if (classof a.material == Arch___Design__mi) then
(
a.material.refl_weight = dist.value
a.material.refl_samples = samples.value
)
(
if (classof a.material == Multimaterial) then
(
for b = 1 to a.material.numsubs do
(
if (classof a.material.materialList[b] == Arch___Design__mi) then
(
a.material.materialList[b].refl_weight = dist.value
a.material.materialList[b].refl_samples = samples.value
)
)
)
)
)
CreateDialog weeevel 161 140 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)
Comments
awesome! great work that
awesome! great work that was what I needed.
some control can be added... like AO and displace parameters...
got it to
got it to work:-
m.bump_map_on = bmp.state
instead of
m.bump_map_on = off
...
or U can use button and ...
bga
trying to add a global bump on/off checkbox
i have managed to creat the off but the toggle im stuck on, cheers:-
try(destroydialog ::weeevel)catch()
rollout weeevel "Universal Material" width:161 height:266
(
spinner refl_weight "Reflect weight : " pos:[5,31] width:155 height:16 range:[0,100,0.6] fieldwidth:60
spinner refl_gloss "Reflect glossy : " pos:[4,52] width:156 height:16 range:[0,100,1] fieldwidth:60
spinner refl_samples "Reflect samples : " pos:[5,73] width:156 height:16 range:[0,100,8] fieldwidth:60
button Enable "Enable reflection" pos:[5,94] width:158 height:21
checkbox bmp "bump on/off" pos:[8,123] width:146 height:29 triState:1
on Enable pressed do
(
ad_Mtls = getClassInstances Arch___Design__mi
if ad_Mtls.count != 0 do
(
for m in ad_Mtls do
(
m.refl_weight = refl_weight.value
m.refl_gloss = refl_gloss.value
m.refl_samples = refl_samples.value
)
)
)
on bmp changed triState do
(
ad_Mtls = getClassInstances Arch___Design__mi
if ad_Mtls.count != 0 do
(
for m in ad_Mtls do
(
m.bump_map_on = off
)
)
)
)
CreateDialog weeevel 168 200 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)
...
It's better to use this concept
bga
...
My pleasure
bga
Thanks you Barigazy, this is
Thanks you Barigazy, this is great, very much appreciated.
...
bga