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