The keyframe_insert method throws python exceptions #122777

Closed
opened 2024-06-05 16:09:18 +02:00 by Alexander Gavrilov · 2 comments

Blender Version

Broken: 4.2+
Worked: 4.1

Short description of error

The insert_keyframe method now can throw python exceptions, which is a regression because it already has a boolean return value. This affects rigify rigs.

Exact steps for others to reproduce the error

# Blender 4.1.1
>>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'})
False

# Blender 4.2-beta
 >>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'})
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
RuntimeError: Error: Could not create 3 F-Curve(s). This can happen when only inserting to available F-Curves.

Or to see the original issue:

  • Load the attached blender file.
  • Click the "Toggle Pole" button in the panel on the right.
**Blender Version** Broken: 4.2+ Worked: 4.1 **Short description of error** The `insert_keyframe` method now can throw python exceptions, which is a regression because it already has a boolean return value. This affects rigify rigs. **Exact steps for others to reproduce the error** ```python # Blender 4.1.1 >>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'}) False # Blender 4.2-beta >>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'}) Traceback (most recent call last): File "<blender_console>", line 1, in <module> RuntimeError: Error: Could not create 3 F-Curve(s). This can happen when only inserting to available F-Curves. ``` Or to see the original issue: * Load the attached blender file. * Click the "Toggle Pole" button in the panel on the right.
Alexander Gavrilov added the
Status
Needs Triage
Type
Report
Severity
Normal
labels 2024-06-05 16:09:19 +02:00
Nathan Vegdahl was assigned by Alexander Gavrilov 2024-06-05 16:09:38 +02:00
Alexander Gavrilov added this to the Animation & Rigging project 2024-06-05 16:09:43 +02:00
Alexander Gavrilov added this to the 4.2 LTS milestone 2024-06-05 16:09:51 +02:00
Member

Can confirm the change in behavior.

Getting the following:

Error: Exception: Error: Could not create 1 F-Curve(s). This can happen when only inserting to available F-Curves.

CC @nathanvegdahl
CC @ChrisLend

Can confirm the change in behavior. Getting the following: `Error: Exception: Error: Could not create 1 F-Curve(s). This can happen when only inserting to available F-Curves.` CC @nathanvegdahl CC @ChrisLend
Philipp Oeser added
Status
Confirmed
Module
Animation & Rigging
and removed
Status
Needs Triage
labels 2024-06-06 09:33:04 +02:00
Nathan Vegdahl added
Severity
High
and removed
Severity
Normal
labels 2024-06-06 10:30:30 +02:00
Sybren A. Stüvel added
Type
Bug
and removed
Type
Report
labels 2024-06-06 10:30:48 +02:00
Sybren A. Stüvel self-assigned this 2024-06-06 10:46:27 +02:00

I managed to reduce the test case to reproduce this API change to a oneliner that works with the default blend file:

# Blender 4.1.1
>>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'})
False

# Blender 4.2-beta
 >>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'})
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
RuntimeError: Error: Could not create 3 F-Curve(s). This can happen when only inserting to available F-Curves.
I managed to reduce the test case to reproduce this API change to a oneliner that works with the default blend file: ```python # Blender 4.1.1 >>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'}) False # Blender 4.2-beta >>> C.object.keyframe_insert('location', options={'INSERTKEY_AVAILABLE'}) Traceback (most recent call last): File "<blender_console>", line 1, in <module> RuntimeError: Error: Could not create 3 F-Curve(s). This can happen when only inserting to available F-Curves. ```
Sybren A. Stüvel changed title from The keyframe_insert method throws python exceptions. to The keyframe_insert method throws python exceptions 2024-06-06 12:41:17 +02:00
Nathan Vegdahl removed their assignment 2024-06-11 10:21:22 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-06-11 11:11:36 +02: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
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
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
Core
Module
Development Management
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
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 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#122777
No description provided.