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-20-2016, 03:13 PM (This post was last modified: 07-20-2016 03:53 PM by micheus.)
Post: #32
RE: YafaRay Plug-in - reviewing for Yafaray 3.0
From the top of my mind I think you cold do something like this bellow. I don't have a way to test it here at my work.

In somewhere that you want to insert it in the export_dialog_qs(Op, Attr) by calling render_pass_frame(Attr):
Code:
%% Render
-define(DEF_RENDER_PASS, disabled).
-define(DEF_LIGHTING_METHOD, directlighting).
...

export_prefs() ->
    RenderPass =
        lists:foldl(fun(N, Acc) ->
                         Acc++[{{pass,N},?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 = {pass,N},
          Value = get_pref(Id, Attr),
          Acc++[{hframe, [
                        {label, PassLabel ++ io_lib:format(" (~w)", [N])},
                        {menu, render_pass_menu(), Value ,[key(Id)]}
                   ]}]
        end, [], lists:seq(1,32)).

render_pass_menu() ->
    [
        {?__(1,"Disabled"),disabled},
        {?__(2,"Combined"),combined},
        {?__(3,"Diffuse"),diffuse},
        {?__(4,"Glossy"),glossy},
        ...
    ].
...
This is a supposed code for create the fields in dialog. To read the fields to fill the export file will be very similar to render_pass_frame.
I'm not an erlang expert, so it can be wrong. Undecided

Could you try this code?

@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-20-2016 03:13 PM
RE: YafaRay Rendering Software - oort - 07-15-2016, 02:28 PM

Forum Jump:


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