ScriptSpot

Forum topic · General Scripting

automatic switch to Deph of Field (mental ray/iray)

By Any · 2019-01-09

Description

for the selected camera there is an option to enable MultiPass Camera Effect
$.mpassEnabled = off

but, with this inclusion, is used Deph of Field effect...

is there a command to automatically enable to Deph of Field (mental ray/iray) effect ???

Comments (5)

.

jahman · 2019-01-09

$.mpassEffect = Depth_of_Field__mental_ray()

Any · 2019-01-09

Thanks so much. The help does not describe this feature....

.

jahman · 2019-01-09

you can always use show $ to print object properties in listener
first I checked what $.mpassEffect returns and then what it returns after I manually change it to mr mode.
then just assign a new instance of dof mode as shown above

Any · 2019-01-09

thank you for the lesson....
another question??? Why spinners do not work
//////////////////////////////////////////////
try (DestroyDialog Test) catch()
utility Test "foo" width:100 height:50
(
spinner spn_TDist "Dist" range:[0,1000,1]
spinner spn_F_Stop "F_Stop" range:[0,10,1]

on Test open do
(
$Camera001.mpassEnabled = on
$Camera001.mpassEffect = Depth_of_Field__mental_ray()
)
on spn_TDist changed val do
(
$Camera001.targetDistance = val
)

on spn_F_Stop changed val do
(
$Camera001.mpassEffect.f-Stop = val
)
)

createDialog Test pos:[100,100]

///////////////////////////////////////////////////////////////

Any · 2019-01-09

yeah, I didn't learn my lesson...