"Mesh -> unwrap -> Reset" creates different results depending on selection state

Hi;

The following usage scenarios lead to different results:

preassumption: a Mesh object exists and NO UVTexture exists

Scenario 1:

1.) go to edit mode
2.) DESELECT all vertices
3.) Mesh -> unwrap -> Reset
4.) SELECT all vertices
5.) Mesh -> Unwrap -> Follow active (quads)

scenario 2:

1.) go to edit mode
2.) SELECT all vertices
3.) Mesh -> unwrap -> Reset
4.) Mesh -> Unwrap -> Follow active (quads)

I added a .blend file, which contains 2 objects, one for scenario 1, another one for scenario 2.
The difference appears, when you look at the UV-editor. The map is somewhat rotated by 90 degrees
and the mesh points are mapped differently

Is this different behaviour intended, or is it a bug ?

=====

Interestingly the script which i have added to the closely related thread

http://blenderartists.org/forum/showthread.php?t=142852

behaves like scenario 1 (excluding step 5).
My main question is: How can we make the script behave like scenario 2, which
creates the results, which i want ?

kind regards,
Gaia

Attachments

unwrap_example.blend (266 KB)

That blows my mind, but… Is it a big problem?

From some of the scripts I’ve read, people work around these sort of problems by

  • making Blender go “silently” into edit mode,
  • saving the user selection in a list,
  • selecting / deselecting all (which ever is needed),
  • doing their operation,
  • restoring the user selection, and
  • restoring the user’s edit mode state

A bit of a workaround, but it’s doable. That way, your user won’t need a specific selection + edit mode state, and will never know that there was any selection going on in the script.

It is an inconsistency which makes a script behave a bit different than expected. In that sense it is is not per se a big problem, but if you don’t know about the different behaviour when scripting, indeed it becomes a problem of understanding and teaching “if you script you must be aware, that the world turns upside down …” I personally hate such things, which tend to blow up to realy hard to solve problems over time. So better get rid of them as soon as possible :wink:

@ThatSoundAgain: yes, i have seen such a workaround too. And i tried to use it. But as the inconsistency turned out to be laying very deep down in the program core, it wouldn’t help. But i meanwhiole found another solution: I simply rotated the UV-map by 90 degrees. Which is inconveniant but it works. We have filed a bug report and as far as i was told, it has been approved and it may be fixed soon. Meanwhile i rotate my uv-texture by 90 degree :wink:

I know what you mean.

I recently ran an old script of mine (from 2.45 or so), which relied on the default UV mapping of a plane. Everything now got turned sideways!

I modified it to explicitly set the UV coordinates to what I wanted, which is the better solution anyway.