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:46 PM (This post was last modified: 07-21-2016 01:55 PM by micheus.)
Post: #43
RE: YafaRay Plug-in - reviewing for Yafaray 3.0
David, since the DEF_RENDER_PASS* are defined as disabled, there is no need for that sequence of defines.

This sequence bellow - in export_prefs() - also doesn't need to be that way:
Quote: {render_pass1,?DEF_RENDER_PASS1},
{render_pass2,?DEF_RENDER_PASS2},
...

it was my bad use a tuple instead of an atom as id for the new fields as I suggested you:
Code:
RenderPass =
        lists:foldl(fun(N, Acc) ->
                         Acc++[{{pass,N},?DEF_RENDER_PASS}]
                     end, [], lists:seq(1,32)),

In that code I suggested you, replace it by:
Code:
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)),

That way you can go back to the logic I tried to suggest before and have less code to write.

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

Forum Jump:


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