bm.faces.layers.int.new() breaks bpy.ops.uv.reset() #52723

Closed
opened 2017-09-13 11:13:56 +02:00 by Marvin Thiel · 6 comments

System Information
Tested on multiple computers and OSs

Blender Version
Broken: Tested on 2.78 (2.78c) and newer builds

After adding a face int layer to a bmesh, the unwrap reset operator only produces weird UV maps.

Exact steps for others to reproduce the error

# Create a new mesh or use an existing one (e.g. from edit mode)
me = bpy.data.meshes.new(filename)
bm = bmesh.new()
bm.from_mesh(me)

# Then add a new integer layer (I'm intending to use this to store a bit field for each face)
type_layer = bm.faces.layers.int.new("Type")

# ... add geometry ...

# Link the object to the scene
ob = bpy.data.objects.new(filename, me)
scene.objects.link(ob)
scene.objects.active = ob

Then in edit mode, select everything, hit U and then Reset. The resulting UV map will consist of rather random lines. It's only broken for objects with this int layer.

File with a mesh that has a layer:
intlayers.blend

Screenshot:
lines.png

**System Information** Tested on multiple computers and OSs **Blender Version** Broken: Tested on 2.78 (2.78c) and newer builds After adding a face int layer to a bmesh, the unwrap reset operator only produces weird UV maps. **Exact steps for others to reproduce the error** ``` # Create a new mesh or use an existing one (e.g. from edit mode) me = bpy.data.meshes.new(filename) bm = bmesh.new() bm.from_mesh(me) # Then add a new integer layer (I'm intending to use this to store a bit field for each face) type_layer = bm.faces.layers.int.new("Type") # ... add geometry ... # Link the object to the scene ob = bpy.data.objects.new(filename, me) scene.objects.link(ob) scene.objects.active = ob ``` Then in edit mode, select everything, hit U and then Reset. The resulting UV map will consist of rather random lines. It's only broken for objects with this int layer. File with a mesh that has a layer: [intlayers.blend](https://archive.blender.org/developer/F794120/intlayers.blend) Screenshot: ![lines.png](https://archive.blender.org/developer/F794124/lines.png)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Yethiel

Added subscriber: @Yethiel

Added subscriber: @Sergey

Added subscriber: @Sergey
Campbell Barton was assigned by Sergey Sharybin 2017-09-13 13:39:09 +02:00

@campbellabrton, is it something you can look into?

@campbellabrton, is it something you can look into?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by d827186c17

This issue was referenced by d827186c17c98bbde418f134e562a99722a141c5
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#52723
No description provided.