Fix #119623: Anim: unintended API change in keyframe_insert() function #119625

Merged
Sybren A. Stüvel merged 1 commits from dr.sybren/blender:pr/fix-119623-insertkey-xyz-rgb into blender-v4.1-release 2024-03-19 10:05:35 +01:00

Bring back the INSERTKEY_XYZ_TO_RGB enum item for the
keyframe_insert() function (it was removed in 30b0c5b225). This way
any Python code that targets Blender 4.x can safely pass this flag,
without having to check specific Blender versions.

Note that the flag is implemented as a no-op, as the behaviour change
introduced in 30b0c5b225 (just looking at the user preference) is still
retained. The purpose of this commit is simply to avoid the ValueError
exception that would otherwise be raised.

This should also fix Rigify report blender/blender-addons#105241.

Bring back the `INSERTKEY_XYZ_TO_RGB` enum item for the `keyframe_insert()` function (it was removed in 30b0c5b225). This way any Python code that targets Blender 4.x can safely pass this flag, without having to check specific Blender versions. Note that the flag is implemented as a no-op, as the behaviour change introduced in 30b0c5b225 (just looking at the user preference) is still retained. The purpose of this commit is simply to avoid the `ValueError` exception that would otherwise be raised. This should also fix Rigify report blender/blender-addons#105241.
Sybren A. Stüvel added this to the 4.1 milestone 2024-03-18 14:43:15 +01:00
Sybren A. Stüvel added the
Module
Animation & Rigging
Priority
High
labels 2024-03-18 14:43:15 +01:00
Sybren A. Stüvel requested review from Alexander Gavrilov 2024-03-18 14:44:17 +01:00
Sybren A. Stüvel requested review from Christoph Lendenfeld 2024-03-18 14:44:25 +01:00
Alexander Gavrilov approved these changes 2024-03-18 15:07:18 +01:00
Alexander Gavrilov left a comment
Member

Assuming that you checked that it does indeed fix the blend file in blender/blender-addons#105241 (but I don't see any reason why not), this looks ok.

Assuming that you checked that it does indeed fix the blend file in https://projects.blender.org/blender/blender-addons/issues/105241 (but I don't see any reason why not), this looks ok.
Author
Member

I have, and indeed the reported error is gone.

I have, and indeed the reported error is gone.
Author
Member

@blender-bot build

@blender-bot build
Sybren A. Stüvel changed target branch from main to blender-v4.1-release 2024-03-18 18:15:20 +01:00
Sybren A. Stüvel force-pushed pr/fix-119623-insertkey-xyz-rgb from a282cbc9df to 82110f00f7 2024-03-18 18:20:28 +01:00 Compare
Author
Member

@blender-bot build

@blender-bot build
Christoph Lendenfeld approved these changes 2024-03-19 09:34:17 +01:00
Christoph Lendenfeld left a comment
Member

thanks for the fix and sorry for the breakage. Didn't think of the API when removing the enum entry

thanks for the fix and sorry for the breakage. Didn't think of the API when removing the enum entry
Author
Member

It happens, no worries!

It happens, no worries!
Sybren A. Stüvel merged commit 30711d1398 into blender-v4.1-release 2024-03-19 10:05:35 +01:00
Sybren A. Stüvel deleted branch pr/fix-119623-insertkey-xyz-rgb 2024-03-19 10:05:41 +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
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
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#119625
No description provided.