Wings 3D Development Forum
TheBounty Renderer (rewrite for wxWidgets) - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Design & Development (https://www.wings3d.com/forum/forumdisplay.php?fid=6)
+--- Thread: TheBounty Renderer (rewrite for wxWidgets) (/showthread.php?tid=440)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


RE: TheBounty Renderer; my fork of YafaRay project - micheus - 11-23-2013

(11-22-2013, 04:42 AM)oort Wrote: I forgot to mention that the "Browse" button under Plugin Preferences > Yafaray > Binarie Folder will not let you select a folder. It tries to force you to pick a file.
Maybe dgud can help with this, but I almost sure that we don't have a function for this operation. I remember to have looked for it before and I didn't find.


RE: TheBounty Renderer; my fork of YafaRay project - oort - 11-23-2013

Micheus,
I took a moment to look at this today. This may or may not be what we are looking for??? The following is in wings_ask.erl. See Dir = filename:dirname below.

oort

Quote:2472 ) browse_hook_fun(Index, Flags) ->
( ) Ps0 = proplists:get_value(props, Flags),
( ) Hook = proplists:get_value(hook, Flags),
( ) Key = proplists:get_value(key, Flags, 0),
( ) fun(update, {_Var,I,_,Sto}) ->
( ) %% This ".junk" trick is to get Name and Dir right
( ) %% even with empty filename.
( ) Name0 = gb_trees:get(var(Key, I+Index), Sto)++".junk",
( ) Dir = filename:dirname
( ) (filename:absname
( ) (Name0, wings_pref:get_value(current_directory))),



RE: TheBounty Renderer; my fork of YafaRay project - micheus - 11-23-2013

oort, that command will extract the directory from the file name selected. If you check the wp8_file.erl (./win32_file; ./wx_file) you will see that they are only managing open_file and save_file. By checking the win32 driver (wings_file_drv.c) you will notice that it is using the respective OS functions (GetOpenFileName and GetSaveFileName). For directory selection Windows uses other function SHBrowseForFolder.
You can also check the wx module of Erlang and you will notice that wings uses a call to wxFileDialog:new for create a Open or Save dialog. For directory browsing it should use wxDirDialog.

So - until this option be added (if it be someday) - the best option is select a file and extract the directory if necessary (using the function you pointed).
I think that for this case it's not a problem since that is interesting be sure that you will find the executable in the place the user choosing it.


RE: TheBounty Renderer; my fork of YafaRay project - oort - 11-23-2013

Micheus,
Thanks for looking at this. I have to ask the question... What is the advantage of defining the folder instead of selecting the executable? Povmaniac, why did you change this???

Thanks,
oort


RE: TheBounty Renderer; my fork of YafaRay project - micheus - 11-23-2013

(11-23-2013, 05:38 AM)oort Wrote: I have to ask the question... What is the advantage of defining the folder instead of selecting the executable?
It is useful mainly when you want to define a place where something should be read or write, but without define what (file name. type, ...) - for that case where you could define a different place for the yafaray's plugins folder.
But, to define where to find the yafaray.exe the best choice would be the Open file dialog (because it require the file select to exist).


RE: TheBounty Renderer; my fork of YafaRay project - Dimitri - 11-23-2013

Micheus, the render menu tab too does not appear...

Oort, I checked it many times... the exe path is ok (it is exactly as it should be, without quotes etc)...

I am using the latest 64bit development build... is there any chance to be something having to do with this build?


RE: TheBounty Renderer; my fork of YafaRay project - micheus - 11-23-2013

(11-23-2013, 10:57 AM)Dimitri Wrote: Micheus, the render menu tab too does not appear...
In this case you should get some output to the console. Did you check it?
I'll prepare a "off install" version of wings+yafaray in order you try to find out what is hapen with your installs.

[edit]
Dimitri, I got it here while testing the "off install". So, I think that you are not open de console to see the error messages.
For the new Wings3d version you need to access the menu Windows->Console to see it and with RMB button you get an option Write to file
I used the plugin from #48 and the yafaray in the #24 (both the last ones)

povmaniac, here what I got for the both situation - direct render access and trying access the dialog:
Code:
wpc_yafaray:command/3: bad return value: {'EXIT',
                                          {{case_clause,{1.0,50.0}},
                                           [{wings_ask,integer_validator,1,
                                             [{file,"wings_ask.erl"},
                                              {line,3218}]},
                                            {wings_ask,mktree_text,4,
                                             [{file,"wings_ask.erl"},
                                              {line,3183}]},
                                            {wings_ask,mktree_container_1,4,
                                             [{file,"wings_ask.erl"},
                                              {line,1468}]},
                                            {wings_ask,mktree_container,5,
                                             [{file,"wings_ask.erl"},
                                              {line,1443}]},
                                            {wings_ask,mktree_container_1,4,
                                             [{file,"wings_ask.erl"},
                                              {line,1468}]},
                                            {wings_ask,mktree_container,5,
                                             [{file,"wings_ask.erl"},
                                              {line,1443}]},
                                            {wings_ask,mktree_container_1,4,
                                             [{file,"wings_ask.erl"},
                                              {line,1468}]},
                                            {wings_ask,mktree_container,5,
                                             [{file,[...]},{line,...}]}]}}
w h: 7 14
wpc_yafaray:command/3: bad return value: {'EXIT',
                                          {{case_clause,{1.0,50.0}},
                                           [{wings_ask,integer_validator,1,
                                             [{file,"wings_ask.erl"},
                                              {line,3218}]},
                                            {wings_ask,mktree_text,4,
                                             [{file,"wings_ask.erl"},
                                              {line,3183}]},
                                            {wings_ask,mktree_container_1,4,
                                             [{file,"wings_ask.erl"},
                                              {line,1468}]},
                                            {wings_ask,mktree_container,5,
                                             [{file,"wings_ask.erl"},
                                              {line,1443}]},
                                            {wings_ask,mktree_container_1,4,
                                             [{file,"wings_ask.erl"},
                                              {line,1468}]},
                                            {wings_ask,mktree_container,5,
                                             [{file,"wings_ask.erl"},
                                              {line,1443}]},
                                            {wings_ask,mktree_container_1,4,
                                             [{file,"wings_ask.erl"},
                                              {line,1468}]},
                                            {wings_ask,mktree_container,5,
                                             [{file,[...]},{line,...}]}]}}
w h: 7 14
It seem to be an old known. Isn't it? post#10

Also, the help text accessed by [?] in the plugins preference has some words mixed - without spaces between them - see Binary folder.


RE: TheBounty Renderer; my fork of YafaRay project - oort - 11-23-2013

It is strange that Windows > Console does not open by itself in Wings3D 64 bit. For me running 32 bit Wings3d 1.5.1 and 1.5.2 the console window opens by itself when a start a YafaRay/TheBounty render. I am using the 22 Nov version of the povmaniac YafaRay/TheBounty plugin.

For the help (?) text, I think you can also remove the information about adding YafaRay to the computers Path, since I have tested without it in my path and YafaRay still works for me.

Maybe Dimitri needs to either delete his preferences file or edit it as described in post #14 Post #14

Quote:The problem now is the value previously saved to the preferences file.
Open it and look for sss_depth, then change 15.0 to 15.
Everyone here testing the code will need do that.
oort


RE: TheBounty Renderer; my fork of YafaRay project - povmaniac - 11-24-2013

Micheus..
Have an problem with this value: {{case_clause,{1.0,50.0}}, ( and others cases)
If you have a old scene, saved with this value, always you obtain the same error.

Because this is an 'work in progress' project , in most cases, you not can use old scenes saved with 'not right' values.
By the way.. How I use the same name for links, always is the last version.
Exporter..
https://dl.dropboxusercontent.com/u/16848591/wings3d/wpc_yafaray.7z
Binaries..
https://dl.dropboxusercontent.com/u/16848591/wings3d/thebounty_win32.7z


RE: TheBounty Renderer; my fork of YafaRay project - Dimitri - 11-24-2013

I am putting below a snapshot of all that appears in the console after trying clicking to the file>render>Bounty (Micheus thanks for the instructions regarding how to find the console within the new version of Wings). Hope that it will give some idea about what may be going on:

[Image: Yafarayproblem_zps8d9d0669.jpg]