Blender V2.61 - r43446

BKE_gpencil.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2008, Blender Foundation
00019  * This is a new part of Blender
00020  *
00021  * Contributor(s): Joshua Leung
00022  *
00023  * ***** END GPL LICENSE BLOCK *****
00024  */
00025 
00026 #ifndef BKE_GPENCIL_H
00027 #define BKE_GPENCIL_H
00028 
00034 struct ListBase;
00035 struct bGPdata;
00036 struct bGPDlayer;
00037 struct bGPDframe;
00038 
00039 /* ------------ Grease-Pencil API ------------------ */
00040 
00041 void free_gpencil_strokes(struct bGPDframe *gpf);
00042 void free_gpencil_frames(struct bGPDlayer *gpl);
00043 void free_gpencil_layers(struct ListBase *list);
00044 void free_gpencil_data(struct bGPdata *gpd);
00045 
00046 struct bGPDframe *gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe);
00047 struct bGPDlayer *gpencil_layer_addnew(struct bGPdata *gpd);
00048 struct bGPdata *gpencil_data_addnew(const char name[]);
00049 
00050 struct bGPDframe *gpencil_frame_duplicate(struct bGPDframe *src);
00051 struct bGPDlayer *gpencil_layer_duplicate(struct bGPDlayer *src);
00052 struct bGPdata *gpencil_data_duplicate(struct bGPdata *gpd);
00053 
00054 //struct bGPdata *gpencil_data_getactive(struct ScrArea *sa);
00055 //short gpencil_data_setactive(struct ScrArea *sa, struct bGPdata *gpd);
00056 //struct ScrArea *gpencil_data_findowner(struct bGPdata *gpd);
00057 
00058 void gpencil_frame_delete_laststroke(struct bGPDlayer *gpl, struct bGPDframe *gpf);
00059 
00060 struct bGPDframe *gpencil_layer_getframe(struct bGPDlayer *gpl, int cframe, short addnew);
00061 void gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf);
00062 struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd);
00063 void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active);
00064 void gpencil_layer_delactive(struct bGPdata *gpd);
00065 
00066 #endif /*  BKE_GPENCIL_H */