Wings 3D Development Forum
Is this a bug in wings_export? - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=9)
+--- Thread: Is this a bug in wings_export? (/showthread.php?tid=365)

Pages: 1 2


Is this a bug in wings_export? - nemyax - 06-27-2013

From wings_export.erl:
Code:
export(Exporter, Name, Ps, #st{shapes=Shs}=St0) ->
    St = wings_view:freeze_mirror(St0),
    ...
Apparently this is supposed to freeze the mirror before continuing to work with the meshes. However, Shs is bound before the freeze.
Shouldn't it be like this instead?
Code:
export(Exporter, Name, Ps, St0) ->
    St = wings_view:freeze_mirror(St0),
    Shs = St#st.shapes,
    ...



RE: Is this a bug in wings_export? - micheus - 06-27-2013

[edited]ops...
It seems you are right. I have to check the code here.

So, Is there any exporter that isn't exporting the mirrored object?


RE: Is this a bug in wings_export? - nemyax - 06-27-2013

Unless they do the freeze in advance, none of them do =)
For example, the OBJ exporter doesn't.


RE: Is this a bug in wings_export? - micheus - 06-28-2013

There were only two exporters I played before and the only one I knew it was "freezing" the object was yafray plugin. For the POV-Ray I thought it was forgotten. Smile

That's probably remains for long time and until now no one has pointed this before. So, it seems the people didn't have problem with that.

If someone is exporting to an other modeller tool, maybe this behaviour would be appropriated, but for a render software it would be better export the frozen object (and in this case, only those exporters would use such command).

Well, I think that now we have a possible problem thinking about change this behaviour. Huh

___
At some moment when I was studying Erlang, I read or someone told me that this king of construction should be avoid: Shs = St#st.shapes.
So, the best code for your suggestion would be:
Code:
export(Exporter, Name, Ps, St0) ->
    #st{shapes=Shs} = St = wings_view:freeze_mirror(St0),
    ...



RE: Is this a bug in wings_export? - nemyax - 10-10-2013

Bump!
Contributors,
Do you think this should be fixed in 1.5?


RE: Is this a bug in wings_export? - ggaliens - 10-10-2013

Nemyax ... get git and do a targeted change and a pull request.


RE: Is this a bug in wings_export? - micheus - 10-10-2013

(10-10-2013, 04:24 PM)ggaliens Wrote: Nemyax ... get git and do a targeted change and a pull request.
I'm already doing that fix right now. Wink

edit: Pull request #57


RE: Is this a bug in wings_export? - nemyax - 10-10-2013

micheus
Thanks!


RE: Is this a bug in wings_export? - adamredwoods - 10-11-2013

I just ran into this bug, too. Thanks for fixing it.


RE: Is this a bug in wings_export? - micheus - 10-11-2013

As the new version is about to be released, I think that this fix will not be on it.
So - by now - I think we'll still need to remember about use the menu option to "Freeze" the objects before use any export option.Wink