static int nla_action_unlink_poll(bContext *C) { if (ED_operator_nla_active(C)) { return nla_panel_context(C, NULL, NULL, NULL); } /* something failed... */ return false; }
/* tweakmode IS enabled */ int nlaop_poll_tweakmode_on (bContext *C) { Scene *scene; /* for now, we check 2 things: * 1) active editor must be NLA * 2) tweakmode is currently set as a 'per-scene' flag * so that it will affect entire NLA data-sets, * but not all AnimData blocks will be in tweakmode for * various reasons */ if (ED_operator_nla_active(C) == 0) return 0; scene= CTX_data_scene(C); if ((scene == NULL) || !(scene->flag & SCE_NLA_EDIT_ON)) return 0; return 1; }