Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-10-18 18:57:14 +0300
committerHans Goudey <h.goudey@me.com>2020-10-18 18:57:14 +0300
commit78a5895c967e17b21e2a0a36309dad7f47bf928e (patch)
tree491cc57162619b8ea649c97796dabecf59060852 /source/blender/editors/object/object_constraint.c
parent806a561e23742a24b5b533f4f1410ea74178ca63 (diff)
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
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c4
1 files changed, 2 insertions, 2 deletions
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;
}