07-21-2016, 01:56 PM
(This post was last modified: 07-21-2016, 02:22 PM by david.bluecame.)
Hello,
With the "individual items" code I got Render Passes working :-) (although it requires some changes I made to Core that will be available in the upcoming YafaRay v3.0.1-beta)
I will try later Micheus' latest changes to optimize the code.
Some examples :-)
Combined pass (typical pass as you know it)
Z-depth pass:
Debug pass - Normals
Direct diffuse only pass
Indirect light pass:
Refraction pass:
Reflection pass:
Hello, Micheus.
When I tried your latest code I initially got this during compilation:
erlc -Werror -pa ../../ebin -pa ../../intl_tools -I ../../intl_tools -I ../../src -I ../../e3d +debug_info -o../../plugins/import_export wpc_yafaray.erl
wpc_yafaray.erl:2198: syntax error before: '}'
wpc_yafaray.erl:2190: function export_prefs/0 undefined
I found an extra "}" in the line
Acc++[list_to_atom(Id),?DEF_RENDER_PASS}]
So I changed it to:
Acc++[list_to_atom(Id),?DEF_RENDER_PASS]
It compiles but then I get this error in runtime when I try to enter the Render->YafaRay window:
wpc_yafaray:command/3: bad return value: {'EXIT',
{badarg,
[{erlang,list_to_atom,
[[114,101,110,100,101,114,95,112,
97,115|...]],
[]},
{wpc_yafaray,
'-export_prefs/0-fun-0-',2,
[{file,"wpc_yafaray.erl"},
{line,2198}]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1262}]},
{wpc_yafaray,export_prefs,0,
[{file,"wpc_yafaray.erl"},
{line,2196}]},
{wpc_yafaray,export_dialog,2,
[{file,"wpc_yafaray.erl"},
{line,2190}]},
{wings_develop,time_command,2,
[{file,"wings_develop.erl"},
{line,81}]},
{wings_plugin,command,3,
[{file,"wings_plugin.erl"},
{line,139}]},
{wings,raw_command_1,3,
[{file,[...]},{line,...}]}]}}
I agree it's much nicer and good practice to do this as an array, with much more compact and scalable code. However, it's too much effort I think, and as it's already working with the "independent" items code I would suggest to keep it that way.
If the multiple defines are not needed, can I just use the same for all the render_passXX atoms?
With the "individual items" code I got Render Passes working :-) (although it requires some changes I made to Core that will be available in the upcoming YafaRay v3.0.1-beta)
I will try later Micheus' latest changes to optimize the code.
Some examples :-)
Combined pass (typical pass as you know it)
Z-depth pass:
Debug pass - Normals
Direct diffuse only pass
Indirect light pass:
Refraction pass:
Reflection pass:
Hello, Micheus.
When I tried your latest code I initially got this during compilation:
erlc -Werror -pa ../../ebin -pa ../../intl_tools -I ../../intl_tools -I ../../src -I ../../e3d +debug_info -o../../plugins/import_export wpc_yafaray.erl
wpc_yafaray.erl:2198: syntax error before: '}'
wpc_yafaray.erl:2190: function export_prefs/0 undefined
I found an extra "}" in the line
Acc++[list_to_atom(Id),?DEF_RENDER_PASS}]
So I changed it to:
Acc++[list_to_atom(Id),?DEF_RENDER_PASS]
It compiles but then I get this error in runtime when I try to enter the Render->YafaRay window:
wpc_yafaray:command/3: bad return value: {'EXIT',
{badarg,
[{erlang,list_to_atom,
[[114,101,110,100,101,114,95,112,
97,115|...]],
[]},
{wpc_yafaray,
'-export_prefs/0-fun-0-',2,
[{file,"wpc_yafaray.erl"},
{line,2198}]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1262}]},
{wpc_yafaray,export_prefs,0,
[{file,"wpc_yafaray.erl"},
{line,2196}]},
{wpc_yafaray,export_dialog,2,
[{file,"wpc_yafaray.erl"},
{line,2190}]},
{wings_develop,time_command,2,
[{file,"wings_develop.erl"},
{line,81}]},
{wings_plugin,command,3,
[{file,"wings_plugin.erl"},
{line,139}]},
{wings,raw_command_1,3,
[{file,[...]},{line,...}]}]}}
I agree it's much nicer and good practice to do this as an array, with much more compact and scalable code. However, it's too much effort I think, and as it's already working with the "independent" items code I would suggest to keep it that way.
If the multiple defines are not needed, can I just use the same for all the render_passXX atoms?