micheus,
Thanks for taking a look and the tip. I tried the change you suggested but that didn't do anything. That part of the code is for lights and YafaRay Meshlights are actually meshes/objects... I wouldn't expect anyone to know that...![Smile Smile](https://www.wings3d.com/forum/images/smilies/smile.png)
I thought that making that change might change the order in which lights are exported but it didn't. It did make me aware of the fact that not only are objects exported in reverse order but that lights are exported in reverse order as well...
Edit: I just modified wings_export.erl, changing all foldl to foldr. This exports everything in normal order. This broke something in the YafaRay exporter so I need to be more selective in my changes. Hopefully this is the solution but also hopefully this doesn't break something else...
![Sad Sad](https://www.wings3d.com/forum/images/smilies/sad.png)
Edit2: I did another test before doing any more code changes and it seems to be working. I will have to do more testing to figure out what I did wrong in my first test...![Smile Smile](https://www.wings3d.com/forum/images/smilies/smile.png)
oort
Thanks for taking a look and the tip. I tried the change you suggested but that didn't do anything. That part of the code is for lights and YafaRay Meshlights are actually meshes/objects... I wouldn't expect anyone to know that...
![Smile Smile](https://www.wings3d.com/forum/images/smilies/smile.png)
I thought that making that change might change the order in which lights are exported but it didn't. It did make me aware of the fact that not only are objects exported in reverse order but that lights are exported in reverse order as well...
Edit: I just modified wings_export.erl, changing all foldl to foldr. This exports everything in normal order. This broke something in the YafaRay exporter so I need to be more selective in my changes. Hopefully this is the solution but also hopefully this doesn't break something else...
![Smile Smile](https://www.wings3d.com/forum/images/smilies/smile.png)
![Sad Sad](https://www.wings3d.com/forum/images/smilies/sad.png)
Edit2: I did another test before doing any more code changes and it seems to be working. I will have to do more testing to figure out what I did wrong in my first test...
![Smile Smile](https://www.wings3d.com/forum/images/smilies/smile.png)
oort