Spline IK joint_bindings parameter is broken #83164

Closed
opened 2020-11-28 21:55:40 +01:00 by Joseph Brandenburg · 9 comments

System Information
Operating system: Linux-5.4.0-48-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 450.80.02

Blender Version
Broken: version: 2.92.0 Alpha, branch: master
Worked: (Seems to work in 2.79, is broken in 2.90.1. I assume 2.80 is where it broke)

Short description of error
The Spline IK constraint has a parameter, joint_bindings that tells the constraint where along the curve to place the joints.
However, this parameter is undefined or at least empty until the user applies the pose.
If the user attempts to access the parameter before the pose is applied, there will be an IndexError. (Alternatively, the parameter can be set from Python and it will then behave normally).
If the user makes Blender re-calculate these bindings (by changing the chain_length parameter through the constraint for example), and attempts to assign or read the property by index, there will be a Crash To Desktop.
(I've never heard of anyone using this feature. The manual doesn't even say how; I'm only using it because I am trying to fix a bug in Spline IK and it was useful for testing an idea.)

Exact steps for others to reproduce the error

  • Open attached file (there is a bone with Spline IK constraint)
  • Go to python console
  • Type C.active_pose_bone.constraints- [x].joint_bindings- [x] (Note that the result is an empty tuple - Bug! If you query the first index, there will be an index error).
  • Apply the pose with Ctrl-A "Apply Pose as Rest Pose".
  • Attempt to query the property again: C.active_pose_bone.constraints- [x].joint_bindings- [x]. It will produce correct results (in my example, it should be [1.0, 0.0]).
    Steps for Crash To Desktop
  • In the Bone Constraints Panel, change the chain length back and forth.
  • Attempt to query the property again: C.active_pose_bone.constraints- [x].joint_bindings[0]
    (An aside: it would be nice to change this property to be reversed in order, it's annoying to list(reverse(new_bindings)) when setting it!)
    Thanks 😃
    bug_start.blend
**System Information** Operating system: Linux-5.4.0-48-generic-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 450.80.02 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master Worked: (Seems to work in 2.79, is broken in 2.90.1. I assume 2.80 is where it broke) **Short description of error** The Spline IK constraint has a parameter, `joint_bindings` that tells the constraint where along the curve to place the joints. However, this parameter is undefined or at least empty until the user applies the pose. If the user attempts to access the parameter before the pose is applied, there will be an `IndexError`. (Alternatively, the parameter can be set from Python and it will then behave normally). If the user makes Blender re-calculate these bindings (by changing the chain_length parameter through the constraint for example), and attempts to assign or read the property by index, there will be a Crash To Desktop. (I've never heard of **anyone** using this feature. The manual doesn't even say how; I'm only using it because I am trying to fix a bug in Spline IK and it was useful for testing an idea.) **Exact steps for others to reproduce the error** - Open attached file (there is a bone with Spline IK constraint) - Go to python console - Type `C.active_pose_bone.constraints- [x].joint_bindings- [x]` (Note that the result is an empty tuple - Bug! If you query the first index, there will be an index error). - Apply the pose with `Ctrl`-`A` "Apply Pose as Rest Pose". - Attempt to query the property again: `C.active_pose_bone.constraints- [x].joint_bindings- [x]`. It will produce correct results (in my example, it should be [1.0, 0.0]). **Steps for Crash To Desktop** - In the Bone Constraints Panel, change the `chain length` back and forth. - Attempt to query the property again: `C.active_pose_bone.constraints- [x].joint_bindings[0]` (An aside: it would be nice to change this property to be reversed in order, it's annoying to `list(reverse(new_bindings))` when setting it!) Thanks 😃 [bug_start.blend](https://archive.blender.org/developer/F9402042/bug_start.blend)

Added subscriber: @Josephbburg

Added subscriber: @Josephbburg

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Thanks for the report. I can confirm.

Thanks for the report. I can confirm.

Thanks for confirming -- I might fix this one in the process of fixing #81704, since I have to touch the joint binding code to fix that one, too. I'll try to remember to poke if it's out of my depth.

Thanks for confirming -- I might fix this one in the process of fixing #81704, since I have to touch the joint binding code to fix that one, too. I'll try to remember to poke if it's out of my depth.

This issue was referenced by dbdf22786d

This issue was referenced by dbdf22786da0f4d1a1d21c2c1454c9c4728b3eba

This issue was referenced by ee486aa5ce

This issue was referenced by ee486aa5ce08fb344fba5cdbb25e017854d67bf4

This issue was referenced by 6c326ba0a2

This issue was referenced by 6c326ba0a24f24763b751483a0ee0cc98abdd921

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2021-08-05 17:23:37 +02: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
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#83164
No description provided.