[Bf-blender-cvs] [51c7a854fe2] master: Fix T81057: PoseBone Constraints are displayed in Object Constraints tab

Philipp Oeser noreply at git.blender.org
Wed Sep 23 16:11:57 CEST 2020


Commit: 51c7a854fe2ad2f1bcd0f2fe3357b6d2d4a00e32
Author: Philipp Oeser
Date:   Wed Sep 23 12:13:25 2020 +0200
Branches: master
https://developer.blender.org/rB51c7a854fe2ad2f1bcd0f2fe3357b6d2d4a00e32

Fix T81057: PoseBone Constraints are displayed in Object Constraints tab

Own mistake in rB9dcae4eb17d7b.

We cannot use ED_object_constraint_active_list in uiTemplateConstraints
since it is dependent on mode (pose vs. object). Now get object
constraints directly when use_bone_constraints is false.

Note: unfortunately a derivate of this bug has made its way into 2.90.1

Maniphest Tasks: T81057

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

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

M	source/blender/editors/interface/interface_templates.c

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

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 9d9a7e53c49..f02d1e06220 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2051,8 +2051,8 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_
   if (use_bone_constraints) {
     constraints = ED_object_pose_constraint_list(C);
   }
-  else {
-    constraints = ED_object_constraint_active_list(ob);
+  else if (ob != NULL) {
+    constraints = &ob->constraints;
   }
 
   /* Switch between the bone panel ID function and the object panel ID function. */



More information about the Bf-blender-cvs mailing list