Wings 3D Development Forum

Full Version: Is this a bug in wings_export?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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,
    ...
[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?
Unless they do the freeze in advance, none of them do =)
For example, the OBJ exporter doesn't.
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),
    ...
Bump!
Contributors,
Do you think this should be fixed in 1.5?
Nemyax ... get git and do a targeted change and a pull request.
(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
micheus
Thanks!
I just ran into this bug, too. Thanks for fixing it.
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
Pages: 1 2
Reference URL's