batch importer - Printable Version +- Wings 3D Development Forum (https://www.wings3d.com/forum) +-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1) +--- Forum: Programming (https://www.wings3d.com/forum/forumdisplay.php?fid=7) +--- Thread: batch importer (/showthread.php?tid=2680) |
batch importer - hartsantler - 09-08-2018 I am trying to figure out how to batch import multiple obj and collada files when wings starts up. I'm new to erlang, and taken a look at the code in: e3d_obj.erl, wings_console.erl, wings_start.erl, wpa.erl, wpc_collada.erl, and wings_plugin.erl. So far i have this code, which loads my obj, but then fails to update the view or show it in the Wings UI. What am i missing? Code: {ok, E3DFile} = e3d_obj:import("/home/username/test.obj"). https://github.com/dgud/wings/issues/298 RE: batch importer - micheus - 09-08-2018 I'm not expert, so maybe my suggestion can not to work. Import will return the new #st{}, then maybe you just need to update it by send that information to the main geometry window who handle most the command messages: Code: ... RE: batch importer - hartsantler - 09-08-2018 actually i'm getting an error from `wings_import:import(E3dFile, wpa:get_state()).` the error is: Code: ** exception error: no function clause matching RE: batch importer - micheus - 09-08-2018 Did you already tried to print out the value of St0 in the line bellow? St0 = wpa:get_state(). RE: batch importer - hartsantler - 09-08-2018 printing St0 gives this: Code: {st, RE: batch importer - micheus - 09-08-2018 Yeap, it's a invalid (null) #st{} |