Blender  V2.93
action_buttons.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2016 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <float.h>
25 #include <math.h>
26 #include <stdio.h>
27 #include <string.h>
28 
29 #include "BLI_utildefines.h"
30 
31 #include "BKE_context.h"
32 #include "BKE_screen.h"
33 
34 #include "action_intern.h" /* own include */
35 
36 /* ******************* action editor space & buttons ************** */
37 
38 /* ******************* general ******************************** */
39 
41 {
42 #if 0
43  PanelType *pt;
44 
45  /* TODO: AnimData / Actions List */
46 
47  pt = MEM_callocN(sizeof(PanelType), "spacetype action panel properties");
48  strcpy(pt->idname, "ACTION_PT_properties");
49  strcpy(pt->label, N_("Active F-Curve"));
51  pt->draw = action_anim_panel_properties;
52  pt->poll = action_anim_panel_poll;
53  BLI_addtail(&art->paneltypes, pt);
54 
55  pt = MEM_callocN(sizeof(PanelType), "spacetype action panel properties");
56  strcpy(pt->idname, "ACTION_PT_key_properties");
57  strcpy(pt->label, N_("Active Keyframe"));
59  pt->draw = action_anim_panel_key_properties;
60  pt->poll = action_anim_panel_poll;
61  BLI_addtail(&art->paneltypes, pt);
62 
63  pt = MEM_callocN(sizeof(PanelType), "spacetype action panel modifiers");
64  strcpy(pt->idname, "ACTION_PT_modifiers");
65  strcpy(pt->label, N_("Modifiers"));
67  pt->draw = action_anim_panel_modifiers;
68  pt->poll = action_anim_panel_poll;
69  BLI_addtail(&art->paneltypes, pt);
70 #endif
71 }
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
#define UNUSED(x)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define N_(msgid)
void action_buttons_register(ARegionType *UNUSED(art))
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
void(* draw)(const struct bContext *C, struct Panel *panel)
Definition: BKE_screen.h:266
bool(* poll)(const struct bContext *C, struct PanelType *pt)
Definition: BKE_screen.h:260
char idname[BKE_ST_MAXNAME]
Definition: BKE_screen.h:241
char translation_context[BKE_ST_MAXNAME]
Definition: BKE_screen.h:244
char label[BKE_ST_MAXNAME]
Definition: BKE_screen.h:242