The old code updated, just for reference:
Code:
%% Render
-define(DEF_RENDER_PASS, disabled).
-define(DEF_LIGHTING_METHOD, directlighting).
...
export_prefs() ->
RenderPass =
lists:foldl(fun(N, Acc) ->
Id = io_lib:format("render_pass~w",[N]),
Acc++[list_to_atom(Id),?DEF_RENDER_PASS}]
end, [], lists:seq(1,32)),
[{subdivisions,?DEF_SUBDIVISIONS},
...
{bokeh_rotation,?DEF_BOKEH_ROTATION},
{dof_distance,?DEF_DOF_DISTANCE}] ++ RenderPass.
export_dialog_qs(Op, Attr) ->
...
{vframe, render_pass_frame(Attr)}
...
render_pass_frame(Attr) ->
PassLabel = ?__(1,"Pass"),
lists:foldl(fun(N, Acc) ->
Id = io_lib:format("render_pass~w",[N]),
Value = get_pref(Id, Attr),
Acc++[{hframe, [
{label, PassLabel ++ io_lib:format(" (~w)", [N])},
{menu, render_pass_menu(), Value ,[key(list_to_atom(Id))]}
]}]
end, [], lists:seq(1,32)).
render_pass_menu() ->
[
{?__(1,"Disabled"),disabled},
{?__(2,"Combined"),combined},
{?__(3,"Diffuse"),diffuse},
{?__(4,"Glossy"),glossy},
...
].
...