Python: mesh.vertex_colors.new broken #105150

Closed
opened 2023-02-23 19:10:50 +01:00 by Scurest · 1 comment
Contributor

System Information
Operating system: Linux

Blender Version
Broken: 3.6.0-alpha+main.e497a50aa207 (build date: 2023-02-23)
Worked: 3.6.0-alpha+main.c39b81d83288 (build date: 2023-02-16)

Short description of error
Creating a new vertex color layer via the mesh.vertex_colors.new API returns an existing layer instead.

Note: I am aware the vertex_colors API is deprecated.

Exact steps for others to reproduce the error
Create a cube, open the Python console and run

>>> C.object.data.vertex_colors.new()
bpy.data.meshes['Cube'].vertex_colors["Col"]  # works!

>>> C.object.data.vertex_colors.new()
bpy.data.meshes['Cube'].vertex_colors["Col"]  # broken

>>> C.object.data.vertex_colors.new(name="Foo")
bpy.data.meshes['Cube'].vertex_colors["Col"]  # broken

In 3.6.0-alpha+main.c39b81d83288, you correctly get three new layers.

**System Information** Operating system: Linux **Blender Version** Broken: 3.6.0-alpha+main.e497a50aa207 (build date: 2023-02-23) Worked: 3.6.0-alpha+main.c39b81d83288 (build date: 2023-02-16) **Short description of error** Creating a new vertex color layer via the `mesh.vertex_colors.new` API returns an existing layer instead. Note: I am aware the `vertex_colors` API is deprecated. **Exact steps for others to reproduce the error** Create a cube, open the Python console and run ```py >>> C.object.data.vertex_colors.new() bpy.data.meshes['Cube'].vertex_colors["Col"] # works! >>> C.object.data.vertex_colors.new() bpy.data.meshes['Cube'].vertex_colors["Col"] # broken >>> C.object.data.vertex_colors.new(name="Foo") bpy.data.meshes['Cube'].vertex_colors["Col"] # broken ``` In 3.6.0-alpha+main.c39b81d83288, you correctly get three new layers.
Scurest added the
Severity
Normal
Type
Report
Status
Needs Triage
labels 2023-02-23 19:10:51 +01:00
Scurest changed title from Regression: mesh.vertex_colors.new broken to Python: mesh.vertex_colors.new broken 2023-02-23 19:11:40 +01:00
Hans Goudey added
Module
Python API
Status
Confirmed
Type
Bug
and removed
Status
Needs Triage
Type
Report
labels 2023-02-23 21:27:40 +01:00
Hans Goudey added this to the 3.5 milestone 2023-02-23 21:27:44 +01:00
Hans Goudey self-assigned this 2023-02-23 21:27:50 +01:00
Member

Thanks for the report!

Thanks for the report!
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-23 21:31:40 +01:00
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
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
2 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#105150
No description provided.