Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_graph/graph_utils.c
| Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | bool graphop_editable_keyframes_poll(bContext *C) | ||||
| bAnimContext ac; | bAnimContext ac; | ||||
| bAnimListElem *ale; | bAnimListElem *ale; | ||||
| ListBase anim_data = {NULL, NULL}; | ListBase anim_data = {NULL, NULL}; | ||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| size_t items; | size_t items; | ||||
| int filter; | int filter; | ||||
| bool found = false; | bool found = false; | ||||
| /* firstly, check if in Graph Editor */ | /* firstly, check if in Graph Editor or Dopesheet */ | ||||
| /* TODO: also check for region? */ | /* TODO: also check for region? */ | ||||
| if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { | if ((area == NULL) || ((area->spacetype != SPACE_GRAPH) && (area->spacetype != SPACE_ACTION))) { | ||||
| return found; | return found; | ||||
| } | } | ||||
| /* try to init Anim-Context stuff ourselves and check */ | /* try to init Anim-Context stuff ourselves and check */ | ||||
| if (ANIM_animdata_get_context(C, &ac) == 0) { | if (ANIM_animdata_get_context(C, &ac) == 0) { | ||||
| return found; | return found; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines | |||||