Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 2,045 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| ARegion *region = CTX_wm_region(C); | ARegion *region = CTX_wm_region(C); | ||||
| Object *ob = ED_object_active_context(C); | Object *ob = ED_object_active_context(C); | ||||
| ListBase *constraints = {NULL}; | ListBase *constraints = {NULL}; | ||||
| if (use_bone_constraints) { | if (use_bone_constraints) { | ||||
| constraints = ED_object_pose_constraint_list(C); | constraints = ED_object_pose_constraint_list(C); | ||||
| } | } | ||||
| else { | else if (ob != NULL) { | ||||
| constraints = ED_object_constraint_active_list(ob); | constraints = &ob->constraints; | ||||
| } | } | ||||
| /* Switch between the bone panel ID function and the object panel ID function. */ | /* Switch between the bone panel ID function and the object panel ID function. */ | ||||
| uiListPanelIDFromDataFunc panel_id_func = use_bone_constraints ? bone_constraint_panel_id : | uiListPanelIDFromDataFunc panel_id_func = use_bone_constraints ? bone_constraint_panel_id : | ||||
| object_constraint_panel_id; | object_constraint_panel_id; | ||||
| const bool panels_match = UI_panel_list_matches_data(region, constraints, panel_id_func); | const bool panels_match = UI_panel_list_matches_data(region, constraints, panel_id_func); | ||||
| ▲ Show 20 Lines • Show All 5,352 Lines • Show Last 20 Lines | |||||