diff options
Diffstat (limited to 'source/blender/include')
-rw-r--r-- | source/blender/include/BDR_drawaction.h | 3 | ||||
-rw-r--r-- | source/blender/include/BDR_gpencil.h | 76 | ||||
-rw-r--r-- | source/blender/include/BIF_drawgpencil.h | 44 | ||||
-rw-r--r-- | source/blender/include/BIF_editaction.h | 28 | ||||
-rw-r--r-- | source/blender/include/BIF_space.h | 8 | ||||
-rw-r--r-- | source/blender/include/BSE_editaction_types.h | 6 | ||||
-rw-r--r-- | source/blender/include/transform.h | 1 |
7 files changed, 161 insertions, 5 deletions
diff --git a/source/blender/include/BDR_drawaction.h b/source/blender/include/BDR_drawaction.h index 91635123cb7..7cb0768e832 100644 --- a/source/blender/include/BDR_drawaction.h +++ b/source/blender/include/BDR_drawaction.h @@ -38,6 +38,7 @@ struct bAction; struct bActionGroup; struct Object; struct ListBase; +struct bGPDlayer; /* ****************************** Base Structs ****************************** */ @@ -82,6 +83,7 @@ void draw_ipo_channel(struct gla2DDrawInfo *di, struct Ipo *ipo, float ypos); void draw_agroup_channel(struct gla2DDrawInfo *di, struct bActionGroup *agrp, float ypos); void draw_action_channel(struct gla2DDrawInfo *di, struct bAction *act, float ypos); void draw_object_channel(struct gla2DDrawInfo *di, struct Object *ob, float ypos); +void draw_gpl_channel(struct gla2DDrawInfo *di, struct bGPDlayer *gpl, float ypos); /* Keydata Generation */ void icu_to_keylist(struct IpoCurve *icu, ListBase *keys, ListBase *blocks, ActKeysInc *aki); @@ -89,6 +91,7 @@ void ipo_to_keylist(struct Ipo *ipo, ListBase *keys, ListBase *blocks, ActKeysIn void agroup_to_keylist(struct bActionGroup *agrp, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void action_to_keylist(struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void ob_to_keylist(struct Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki); +void gpl_to_keylist(struct bGPDlayer *gpl, ListBase *keys, ListBase *blocks, ActKeysInc *aki); #endif /* BDR_DRAWACTION_H */ diff --git a/source/blender/include/BDR_gpencil.h b/source/blender/include/BDR_gpencil.h new file mode 100644 index 00000000000..d0ebd096ecb --- /dev/null +++ b/source/blender/include/BDR_gpencil.h @@ -0,0 +1,76 @@ +/** + * $Id: BDR_gpencil.h 14444 2008-04-16 22:40:48Z aligorith $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008, Blender Foundation + * This is a new part of Blender + * + * Contributor(s): Joshua Leung + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef BDR_GPENCIL_H +#define BDR_GPENCIL_H + +struct ListBase; +struct bScreen; +struct ScrArea; +struct View3D; +struct SpaceNode; +struct SpaceSeq; +struct bGPdata; +struct bGPDlayer; +struct bGPDframe; + +/* ------------ Grease-Pencil API ------------------ */ + +void free_gpencil_strokes(struct bGPDframe *gpf); +void free_gpencil_frames(struct bGPDlayer *gpl); +void free_gpencil_layers(struct ListBase *list); +void free_gpencil_data(struct bGPdata *gpd); + +struct bGPDframe *gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe); +struct bGPDlayer *gpencil_layer_addnew(struct bGPdata *gpd); +struct bGPdata *gpencil_data_addnew(void); + +struct bGPdata *gpencil_data_duplicate(struct bGPdata *gpd); + +struct bGPdata *gpencil_data_getactive(struct ScrArea *sa); +short gpencil_data_setactive(struct ScrArea *sa, struct bGPdata *gpd); +struct bGPdata *gpencil_data_getetime(struct bScreen *sc); +void gpencil_data_setetime(struct bScreen *sc, struct bGPdata *gpd); + +void gpencil_frame_delete_laststroke(struct bGPDframe *gpf); + +struct bGPDframe *gpencil_layer_getframe(struct bGPDlayer *gpl, int cframe, short addnew); +void gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf); +struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd); +void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active); +void gpencil_layer_delactive(struct bGPdata *gpd); + +void gpencil_delete_actframe(struct bGPdata *gpd); +void gpencil_delete_laststroke(struct bGPdata *gpd); + +void gpencil_delete_operation(short mode); +void gpencil_delete_menu(void); + +//short gpencil_paint(short mousebutton); +short gpencil_do_paint(struct ScrArea *sa); + +#endif /* BDR_GPENCIL_H */ diff --git a/source/blender/include/BIF_drawgpencil.h b/source/blender/include/BIF_drawgpencil.h new file mode 100644 index 00000000000..418446313df --- /dev/null +++ b/source/blender/include/BIF_drawgpencil.h @@ -0,0 +1,44 @@ +/** + * $Id: BIF_drawgpencil.h 14444 2008-04-16 22:40:48Z aligorith $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008, Blender Foundation + * This is a new part of Blender + * + * Contributor(s): Joshua Leung + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef BIF_DRAWGPENCIL_H +#define BIF_DRAWGPENCIL_H + +struct ScrArea; +struct View3D; +struct SpaceNode; +struct SpaceSeq; +struct bGPdata; +struct uiBlock; + +short draw_gpencil_panel(struct uiBlock *block, struct bGPdata *gpd, struct ScrArea *sa); + +void draw_gpencil_2dview(struct ScrArea *sa, short onlyv2d); +void draw_gpencil_3dview(struct ScrArea *sa, short only3d); +void draw_gpencil_oglrender(struct View3D *v3d, int winx, int winy); + +#endif /* BIF_DRAWGPENCIL_H */ diff --git a/source/blender/include/BIF_editaction.h b/source/blender/include/BIF_editaction.h index 7e0f703681b..9f6751daeff 100644 --- a/source/blender/include/BIF_editaction.h +++ b/source/blender/include/BIF_editaction.h @@ -48,7 +48,8 @@ enum { ACTTYPE_FILLIPO, ACTTYPE_FILLCON, ACTTYPE_IPO, - ACTTYPE_SHAPEKEY + ACTTYPE_SHAPEKEY, + ACTTYPE_GPLAYER }; /* Macros for easier/more consistant state testing */ @@ -69,7 +70,10 @@ enum { #define EDITABLE_ICU(icu) ((icu->flag & IPO_PROTECT)==0) #define SEL_ICU(icu) (icu->flag & IPO_SELECT) -#define NLA_ACTION_SCALED (G.saction->pin==0 && OBACT && OBACT->action) +#define EDITABLE_GPL(gpl) ((gpl->flag & GP_LAYER_LOCKED)==0) +#define SEL_GPL(gpl) ((gpl->flag & GP_LAYER_ACTIVE) || (gpl->flag & GP_LAYER_SELECT)) + +#define NLA_ACTION_SCALED (G.saction->mode==SACTCONT_ACTION && G.saction->pin==0 && OBACT && OBACT->action) #define NLA_IPO_SCALED (OBACT && OBACT->action && G.sipo->pin==0 && G.sipo->actname) /* constants for setting ipo-interpolation type */ @@ -114,6 +118,8 @@ struct BWinEvent; struct Key; struct ListBase; struct TimeMarker; +struct bGPdata; +struct bGPDlayer; /* Key operations */ void transform_action_keys(int mode, int dummy); @@ -176,6 +182,24 @@ void action_add_localmarker(struct bAction *act, int frame); void action_rename_localmarker(struct bAction *act); void action_remove_localmarkers(struct bAction *act); +/* Grease-Pencil Data */ +void gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short onlysel); + +void deselect_gpencil_layers(struct bGPdata *gpd, short select_mode); + +short is_gplayer_frame_selected(struct bGPDlayer *gpl); +void set_gplayer_frame_selection(struct bGPDlayer *gpl, short mode); +void select_gpencil_frames(struct bGPDlayer *gpl, short select_mode); +void select_gpencil_frame(struct bGPDlayer *gpl, int selx, short select_mode); +void borderselect_gplayer_frames(struct bGPDlayer *gpl, float min, float max, short select_mode); + +void delete_gpencil_layers(void); +void delete_gplayer_frames(struct bGPDlayer *gpl); +void duplicate_gplayer_frames(struct bGPDlayer *gpd); + +void snap_gplayer_frames(struct bGPDlayer *gpl, short mode); +void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode); + /* ShapeKey stuff */ struct Key *get_action_mesh_key(void); int get_nearest_key_num(struct Key *key, short *mval, float *x); diff --git a/source/blender/include/BIF_space.h b/source/blender/include/BIF_space.h index 37be4a9eafc..4b2b8e14bb6 100644 --- a/source/blender/include/BIF_space.h +++ b/source/blender/include/BIF_space.h @@ -53,6 +53,7 @@ struct SpaceOops; #define VIEW3D_HANDLER_PREVIEW 4 #define VIEW3D_HANDLER_MULTIRES 5 #define VIEW3D_HANDLER_TRANSFORM 6 +#define VIEW3D_HANDLER_GREASEPENCIL 7 /* ipo handler codes */ #define IPO_HANDLER_PROPERTIES 20 @@ -73,11 +74,15 @@ struct SpaceOops; #define NLA_HANDLER_PROPERTIES 50 /* sequence handler codes */ -#define SEQ_HANDLER_PROPERTIES 60 +#define SEQ_HANDLER_PROPERTIES 60 +#define SEQ_HANDLER_GREASEPENCIL 61 /* imasel handler codes */ #define IMASEL_HANDLER_IMAGE 70 +/* nodes handler codes */ +#define NODES_HANDLER_GREASEPENCIL 80 + /* theme codes */ #define B_ADD_THEME 3301 #define B_DEL_THEME 3302 @@ -145,3 +150,4 @@ extern void mainwindow_close(void); #endif + diff --git a/source/blender/include/BSE_editaction_types.h b/source/blender/include/BSE_editaction_types.h index c531383accc..be210415973 100644 --- a/source/blender/include/BSE_editaction_types.h +++ b/source/blender/include/BSE_editaction_types.h @@ -38,7 +38,8 @@ typedef enum ALE_KEYTYPE { ALE_NONE = 0, ALE_IPO, ALE_ICU, - ALE_GROUP + ALE_GROUP, + ALE_GPFRAME, } ALE_KEYTYPE; /* This struct defines a structure used for quick access */ @@ -78,7 +79,8 @@ typedef enum ACTFILTER_FLAGS { typedef enum ACTCONT_TYPES { ACTCONT_NONE = 0, ACTCONT_ACTION, - ACTCONT_SHAPEKEY + ACTCONT_SHAPEKEY, + ACTCONT_GPENCIL } ACTCONT_TYPES; #endif diff --git a/source/blender/include/transform.h b/source/blender/include/transform.h index 4e3b80134f9..720b856a149 100644 --- a/source/blender/include/transform.h +++ b/source/blender/include/transform.h @@ -397,6 +397,7 @@ int Align(TransInfo *t, short mval[2]); /*********************** transform_conversions.c ********** */ struct ListBase; +void flushTransGPactionData(TransInfo *t); void flushTransIpoData(TransInfo *t); void flushTransUVs(TransInfo *t); void flushTransParticles(TransInfo *t); |