• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Design & Development v
« Previous 1 2 3 4 5 6 … 11 Next »
Zaribok: RenderMan exporter

 
  • 0 Vote(s) - 0 Average
Zaribok: RenderMan exporter

Pages (3): « Previous 1 2 3
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#21
01-17-2019, 07:54 AM
I've posted another update (0.3.20190116). It fixes scene light export, which crashed the plug in Wings 2.2.1.
For some reason the API's return value type for scene lights is now different from the one for default lights, so the plug works with both types.
There's also a new option for launching your favourite viewer to display your renders.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,676
Threads: 183
Joined: Jun 2012
#22
01-17-2019, 10:37 AM
(01-17-2019, 07:54 AM)nemyax Wrote: For some reason the API's return value type for scene lights is now different from the one for default lights, so the plug works with both types.
In v2.2.1 Björng changed the way that value for scene lights is returned and that broke the render exporters - it's a know issue to be fixed.

I hope he could to add back a option to export the old way too.
In the mean time - if you don't care about the light names - then you could to check if the light's data contains its name or not. Then you plugin can work with both versions.

The old way the wpa:lights/1 would to return a list of light data like this:
[{Name, [{opengl,[{type,...},...]}|Props} | Ligths] :: ([{Name,Properties},..])
and now it's returning this way:
[[{opengl,[{type,...},...]}|Props] | Ligths] :: ([Properties,..])
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#23
01-17-2019, 11:50 AM
Yes, I worked around it like this:
Code:
gather_lights(St) ->
    MaybeLights = wpa:lights(St),
    SceneLights = wings_pref:get_value(scene_lights),
    Lights = if
        MaybeLights =:= []; SceneLights =:= false ->
            wings_light:export_camera_lights();
        true -> MaybeLights end,
    gl0(Lights, 0, []).
gl0([], _, Result) -> Result;
gl0([{Name,Props}|T], NumSuf, Result) ->
    gl0(T, NumSuf, gl1(Name, Props, Result));
gl0([Props|T], NumSuf, Result) when is_list(Props) ->
    gl0(T, NumSuf + 1, gl1("light" ++ integer_to_list(NumSuf), Props, Result)).
gl1(Name, Props, Result) ->
    case proplists:get_value(visible, Props) of
        true -> [{Name,Props}|Result];
        _ -> Result end.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode