diff options
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 77a9d9f549a..28c986f87cc 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2063,6 +2063,14 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_ UI_panels_free_instanced(C, region); bConstraint *con = (constraints == NULL) ? NULL : constraints->first; for (int i = 0; con; i++, con = con->next) { + /* Dont show temporary constraints (AutoIK and targetless IK constraints). */ + if (con->type == CONSTRAINT_TYPE_KINEMATIC) { + bKinematicConstraint *data = con->data; + if (data->flag & CONSTRAINT_IK_TEMP) { + continue; + } + } + char panel_idname[MAX_NAME]; panel_id_func(con, panel_idname); @@ -2086,6 +2094,14 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_ /* Assuming there's only one group of instanced panels, update the custom data pointers. */ Panel *panel = region->panels.first; LISTBASE_FOREACH (bConstraint *, con, constraints) { + /* Dont show temporary constraints (AutoIK and targetless IK constraints). */ + if (con->type == CONSTRAINT_TYPE_KINEMATIC) { + bKinematicConstraint *data = con->data; + if (data->flag & CONSTRAINT_IK_TEMP) { + continue; + } + } + /* Move to the next instanced panel corresponding to the next constraint. */ while ((panel->type == NULL) || !(panel->type->flag & PNL_INSTANCED)) { panel = panel->next; |