Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
YafaRay Plug-in - reviewing for Yafaray 3.0
07-21-2016, 01:54 PM (This post was last modified: 07-21-2016 01:54 PM by micheus.)
Post: #44
RE: YafaRay Plug-in - reviewing for Yafaray 3.0
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},
        ...
    ].
...

@MicheusVieira MicheusVieira Micheuss micheus4wings3d
* Wings3D Team stands for: Björn and Dan
Reply


Messages In This Thread
RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - micheus - 07-21-2016 01:54 PM
RE: YafaRay Rendering Software - oort - 07-15-2016, 02:28 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)