Hi,
I'm busy creating my VRay Automator script, but I get an error I can't seem to get rid of. This is a snippet from my script:
---------------------------------------------
group "Values"
(
label multiplier "Multiplier" pos:[56,123]
across:3
spinner multipliervalue pos:[100,123] range:[0,10000,30] type:#float scale:1 fieldwidth:40
button setmultipliervalue "Set All" pos:[165,121]
button setmultipliervaluesel "Set Sel." pos:[220,121]
label samplingsubd "Sampling Subdivs" pos:[12,150]
across:3
spinner samplingsubdvalue pos:[100,150] range:[1,1000,12] type:#integer scale:1 fieldwidth:40
button setsamplingsubdvalue "Set All" pos:[165,148]
button setsamplingsubdvaluesel "Set Sel." pos:[220,148]
) -- close group
on setmultipliervalue pressed do
(
for i in $* do
(
if classof i == VRayLight then
(
i.multiplier = multipliervalue
)
)
)
on setmultipliervaluesel pressed do
(
for i in selection do
(
if classof i == VRayLight then
(
i.multiplier = multipliervalue
)
)
)
on setsamplingsubdvalue pressed do
(
for i in $* do
(
if classof i == VRayLight then
(
i.subdivs = samplingsubdvalue
)
)
)
on setsamplingsubdvaluesel pressed do
(
for i in selection do
(
if classof i == VRayLight then
(
i.subdivs = samplingsubdvalue
)
)
)
---------------------------------------------------
When I run the script and press one of the buttons from the Value group (for example the Set All button next to the Multiplier spinner), I get an error that it can't convert the value to either float or integer, according to the type of button I pressed. The strange thing is that I've specified in the spinner lines that the multiplier is a float value and the sampling subdivs value is integer. According to the listener the syntax for the VRayLight multiplier is $.multiplier and the value type is float in the interface.
What am I doing wrong?
Cheers,
Metin
I'm busy creating my VRay Automator script, but I get an error I can't seem to get rid of. This is a snippet from my script:
---------------------------------------------
group "Values"
(
label multiplier "Multiplier" pos:[56,123]
across:3
spinner multipliervalue pos:[100,123] range:[0,10000,30] type:#float scale:1 fieldwidth:40
button setmultipliervalue "Set All" pos:[165,121]
button setmultipliervaluesel "Set Sel." pos:[220,121]
label samplingsubd "Sampling Subdivs" pos:[12,150]
across:3
spinner samplingsubdvalue pos:[100,150] range:[1,1000,12] type:#integer scale:1 fieldwidth:40
button setsamplingsubdvalue "Set All" pos:[165,148]
button setsamplingsubdvaluesel "Set Sel." pos:[220,148]
) -- close group
on setmultipliervalue pressed do
(
for i in $* do
(
if classof i == VRayLight then
(
i.multiplier = multipliervalue
)
)
)
on setmultipliervaluesel pressed do
(
for i in selection do
(
if classof i == VRayLight then
(
i.multiplier = multipliervalue
)
)
)
on setsamplingsubdvalue pressed do
(
for i in $* do
(
if classof i == VRayLight then
(
i.subdivs = samplingsubdvalue
)
)
)
on setsamplingsubdvaluesel pressed do
(
for i in selection do
(
if classof i == VRayLight then
(
i.subdivs = samplingsubdvalue
)
)
)
---------------------------------------------------
When I run the script and press one of the buttons from the Value group (for example the Set All button next to the Multiplier spinner), I get an error that it can't convert the value to either float or integer, according to the type of button I pressed. The strange thing is that I've specified in the spinner lines that the multiplier is a float value and the sampling subdivs value is integer. According to the listener the syntax for the VRayLight multiplier is $.multiplier and the value type is float in the interface.
What am I doing wrong?
Cheers,
Metin
Comment