bm.faces.layers.int.new() breaks UV Unwrap Reset


(Yethiel) #1

EDIT: Apparently you’re not supposed to edit stuff from a panel and use a global dict to store the bmesh instead. I’ll report back when I implemented that.

I’m creating an add-on for Re-Volt file types.
The meshes for the game support flags and I’m saving those per face on an integer layer.

I have a panel for setting those properties in my panels.py. Now I found out, that the lines


flags = bm.faces.layers.int.get("Flags") or bm.faces.layers.int.new("Flags")
texture = bm.faces.layers.int.get("Texture") or bm.faces.layers.int.new("Texture")

(line on GitHub)
break the bpy.ops.uv.reset() operator. More specifically the part bm.faces.layers.int.new(“layer name”).

These lines are for creating integer layers on a bmesh if it doesn’t exist yet.

Resetting the mapping on any object results in weird lines:


After commenting out those lines or not attempting to create a new layer, the Reset operator works again.
I’d be glad to hear some tips. Maybe I’m doing something completely wrong.

Regards,
Yethiel


(Yethiel) #2

The editing feature seems to be borken, sorry for the double post.

I found out that this issue was indeed a bug that’s now been fixed: https://developer.blender.org/rBd827186c17c98bbde418f134e562a99722a141c5