[Bf-blender-cvs] [78a5895c967] master: Fix T81800: Datablock pin not working for bones in pose mode

Hans Goudey noreply at git.blender.org
Sun Oct 18 17:57:21 CEST 2020


Commit: 78a5895c967e17b21e2a0a36309dad7f47bf928e
Author: Hans Goudey
Date:   Sun Oct 18 10:57:14 2020 -0500
Branches: master
https://developer.blender.org/rB78a5895c967e17b21e2a0a36309dad7f47bf928e

Fix T81800: Datablock pin not working for bones in pose mode

The "active_pose_bone" context variable isn't accessed from
`buttons_context`, it uses `screen_context` instead. This means
it can't account for pinning in the property editor.

Using "pose_bone" context variable first means the property
editor context will be used and the pinning will work.

Differential Revision: https://developer.blender.org/D9242

===================================================================

M	source/blender/editors/object/object_constraint.c

===================================================================

diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 0f05608b82f..0073aa830de 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -111,9 +111,9 @@ ListBase *ED_object_constraint_active_list(Object *ob)
  */
 ListBase *ED_object_pose_constraint_list(const bContext *C)
 {
-  bPoseChannel *pose_bone = CTX_data_pointer_get(C, "active_pose_bone").data;
+  bPoseChannel *pose_bone = CTX_data_pointer_get(C, "pose_bone").data;
   if (pose_bone == NULL) {
-    pose_bone = CTX_data_pointer_get(C, "pose_bone").data;
+    pose_bone = CTX_data_pointer_get(C, "active_pose_bone").data;
     if (pose_bone == NULL) {
       return NULL;
     }



More information about the Bf-blender-cvs mailing list