Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
Is this a bug in wings_export?
06-27-2013, 12:31 PM
Post: #1
Is this a bug in wings_export?
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,
    ...
Reply
06-27-2013, 07:13 PM (This post was last modified: 06-27-2013 07:16 PM by micheus.)
Post: #2
RE: Is this a bug in wings_export?
[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?
Reply
06-27-2013, 09:02 PM
Post: #3
RE: Is this a bug in wings_export?
Unless they do the freeze in advance, none of them do =)
For example, the OBJ exporter doesn't.
Reply
06-28-2013, 12:27 PM
Post: #4
RE: Is this a bug in wings_export?
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),
    ...
Reply
10-10-2013, 09:12 AM
Post: #5
RE: Is this a bug in wings_export?
Bump!
Contributors,
Do you think this should be fixed in 1.5?
Reply
10-10-2013, 04:24 PM
Post: #6
RE: Is this a bug in wings_export?
Nemyax ... get git and do a targeted change and a pull request.
Reply
10-10-2013, 04:25 PM (This post was last modified: 10-10-2013 05:21 PM by micheus.)
Post: #7
RE: Is this a bug in wings_export?
(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
Reply
10-10-2013, 04:26 PM
Post: #8
RE: Is this a bug in wings_export?
micheus
Thanks!
Reply
10-11-2013, 04:34 AM
Post: #9
RE: Is this a bug in wings_export?
I just ran into this bug, too. Thanks for fixing it.
Reply
10-11-2013, 04:54 PM
Post: #10
RE: Is this a bug in wings_export?
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
Reply


Forum Jump:


User(s) browsing this thread: 1 Guest(s)