Regression: mesh.vertex_colors.active doesn't work since 3.2 #104803

Closed
opened 2023-02-16 04:01:15 +01:00 by Scurest · 6 comments
Contributor

System Information
Operating system: Linux

Blender Version
Broken: 3.2 - 3.5 1beaec46b8
Worked: 3.1

Most probably caused by eae36be372

Short description of error
mesh.vertex_colors.active no longer works since 3.2 (when vertex colors changed to color attributes). It now always returns the first vertex color layer.

Noticed in this SE question.

Exact steps for others to reproduce the error
In 3.1, create a cube and add two vertex color layers. Clicking on one in the Properties window makes it active and highlighted. Run C.object.data.vertex_colors.active in the Python console and it will return whichever is active.

Open 3.2. Do the same thing (creating Byte Color + Corner color attributes). C.object.data.vertex_colors.active no longer returns the one that's active, but always returns the first.

Same is true for bmesh.loops.layers.color.active

Using the new C.object.data.color_attributes.active_color endpoint works.

**System Information** Operating system: Linux **Blender Version** Broken: 3.2 - 3.5 1beaec46b8e3 Worked: 3.1 Most probably caused by eae36be372a6 **Short description of error** `mesh.vertex_colors.active` no longer works since 3.2 (when vertex colors changed to color attributes). It now always returns the first vertex color layer. Noticed in [this SE question](https://blender.stackexchange.com/questions/286325/getting-and-using-the-selected-color-attribute). **Exact steps for others to reproduce the error** In 3.1, create a cube and add two vertex color layers. Clicking on one in the Properties window makes it active and highlighted. Run `C.object.data.vertex_colors.active` in the Python console and it will return whichever is active. Open 3.2. Do the same thing (creating Byte Color + Corner color attributes). `C.object.data.vertex_colors.active` no longer returns the one that's active, but always returns the first. Same is true for `bmesh.loops.layers.color.active` Using the new `C.object.data.color_attributes.active_color` endpoint works.
Scurest added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-02-16 04:01:16 +01:00

The property is marked as deprecated in docs, so will close this report.

The property is marked as deprecated in [docs](https://docs.blender.org/api/current/bpy.types.Mesh.html#bpy.types.Mesh.vertex_colors), so will close this report.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-02-16 04:26:04 +01:00
Author
Contributor

Deprecated does not mean "is allowed to be buggy". The whole point of keeping deprecated APIs around is backwards compatibility. If you are not going to actually keep deprecated APIs functional, you should remove them outright.

Deprecated does not mean "is allowed to be buggy". The whole point of keeping deprecated APIs around is backwards compatibility. If you are not going to actually keep deprecated APIs functional, you should remove them outright.
Member

Hm, I have to agree with @scurest here, deprecated does not mean "possibly broken".

I would at least like feedback from @HooglyBoogly on this.

Hm, I have to agree with @scurest here, deprecated does not mean "possibly broken". I would at least like feedback from @HooglyBoogly on this.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-02-16 09:38:05 +01:00
Member

To get a shortterm answer, I'll even set this to High prio

To get a shortterm answer, I'll even set this to High prio
Philipp Oeser changed title from Python: mesh.vertex_colors.active doesn't work since 3.2 to Regression: mesh.vertex_colors.active doesn't work since 3.2 2023-02-16 09:39:02 +01:00
Philipp Oeser added
Priority
High
Module
Modeling
Status
Confirmed
and removed
Priority
Normal
Status
Needs Triage
labels 2023-02-16 09:39:40 +01:00
Member

Just noticed that the same is true for bmesh.loops.layers.color.active (and that hasnt been marked deprecated)

Just noticed that the same is true for `bmesh.loops.layers.color.active` (and that hasnt been marked deprecated)
Member

Most probably caused by eae36be372

CC @JosephEagar
CC @ideasman42

Most probably caused by eae36be372a6 CC @JosephEagar CC @ideasman42
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-24 20:11:06 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
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
3 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#104803
No description provided.