Revision: 15701
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15701
Author:   campbellbarton
Date:     2008-07-22 20:48:28 +0200 (Tue, 22 Jul 2008)

Log Message:
-----------
these files missed the merge

Added Paths:
-----------
    branches/apricot/source/blender/include/BDR_gpencil.h
    branches/apricot/source/blender/include/BIF_drawgpencil.h
    branches/apricot/source/blender/makesdna/DNA_gpencil_types.h

Added: branches/apricot/source/blender/include/BDR_gpencil.h
===================================================================
--- branches/apricot/source/blender/include/BDR_gpencil.h                       
        (rev 0)
+++ branches/apricot/source/blender/include/BDR_gpencil.h       2008-07-22 
18:48:28 UTC (rev 15701)
@@ -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 */

Added: branches/apricot/source/blender/include/BIF_drawgpencil.h
===================================================================
--- branches/apricot/source/blender/include/BIF_drawgpencil.h                   
        (rev 0)
+++ branches/apricot/source/blender/include/BIF_drawgpencil.h   2008-07-22 
18:48:28 UTC (rev 15701)
@@ -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 */ 

Added: branches/apricot/source/blender/makesdna/DNA_gpencil_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_gpencil_types.h                
                (rev 0)
+++ branches/apricot/source/blender/makesdna/DNA_gpencil_types.h        
2008-07-22 18:48:28 UTC (rev 15701)
@@ -0,0 +1,141 @@
+/**
+ * $Id: DNA_gpencil_types.h 8768 2006-11-07 00:10:37Z 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 DNA_GPENCIL_TYPES_H
+#define DNA_GPENCIL_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+/* Grease-Pencil Annotations - 'Stroke Point'
+ *     -> Coordinates may either be 2d or 3d depending on settings at the time
+ *     -> Coordinates of point on stroke, in proportions of window size
+ *             (i.e. n/1000). This assumes that the bottom-left corner is (0,0)
+ */
+typedef struct bGPDspoint {
+       float x, y, z;                  /* co-ordinates of point (usually 2d, 
but can be 3d as well) */                         
+       float pressure;                 /* pressure of input device (from 0 to 
1) at this point */
+} bGPDspoint;
+
+/* Grease-Pencil Annotations - 'Stroke'
+ *     -> A stroke represents a (simplified version) of the curve
+ *        drawn by the user in one 'mousedown'->'mouseup' operation
+ */
+typedef struct bGPDstroke {
+       struct bGPDstroke *next, *prev;
+       
+       bGPDspoint *points;             /* array of data-points for stroke */
+       int totpoints;                  /* number of data-points in array */
+       
+       short thickness;                /* thickness of stroke (currently not 
used) */  
+       short flag;                             /* various settings about this 
stroke */
+} bGPDstroke;
+
+/* bGPDstroke->flag */
+       /* stroke is in 3d-space */
+#define GP_STROKE_3DSPACE              (1<<0)
+       /* stroke is in 2d-space */
+#define GP_STROKE_2DSPACE              (1<<1)
+
+
+/* Grease-Pencil Annotations - 'Frame'
+ *     -> Acts as storage for the 'image' formed by strokes
+ */
+typedef struct bGPDframe {
+       struct bGPDframe *next, *prev;
+       
+       ListBase strokes;       /* list of the simplified 'strokes' that make 
up the frame's data */
+       
+       int framenum;           /* frame number of this frame */
+       int flag;                       /* temp settings */
+} bGPDframe;
+
+/* bGPDframe->flag */  
+       /* frame is being painted on */
+#define GP_FRAME_PAINT         (1<<0)
+       /* for editing in Action Editor */
+#define GP_FRAME_SELECT                (1<<1)
+
+
+/* Grease-Pencil Annotations - 'Layer' */
+typedef struct bGPDlayer {
+       struct bGPDlayer *next, *prev;
+       
+       ListBase frames;                /* list of annotations to display for 
frames (bGPDframe list) */
+       bGPDframe *actframe;    /* active frame (should be the frame that is 
currently being displayed) */
+       
+       int flag;                               /* settings for layer */        
        
+       short thickness;                /* current thickness to apply to 
strokes */
+       short gstep;                    /* max number of frames between active 
and ghost to show (0=only those on either side) */
+       
+       float color[4];                 /* color that should be used to draw 
all the strokes in this layer */
+       
+       char info[128];                 /* optional reference info about this 
layer (i.e. "director's comments, 12/3") */
+} bGPDlayer;
+
+/* bGPDlayer->flag */
+       /* don't display layer */
+#define GP_LAYER_HIDE          (1<<0)
+       /* protected from further editing */
+#define GP_LAYER_LOCKED                (1<<1)  
+       /* layer is 'active' layer being edited */
+#define GP_LAYER_ACTIVE                (1<<2)
+       /* draw points of stroke for debugging purposes */
+#define GP_LAYER_DRAWDEBUG     (1<<3)
+       /* do onionskinning */
+#define GP_LAYER_ONIONSKIN     (1<<4)
+       /* for editing in Action Editor */
+#define GP_LAYER_SELECT                (1<<5)
+
+
+/* Grease-Pencil Annotations - 'DataBlock' */
+typedef struct bGPdata {
+       /* saved Grease-Pencil data */
+       ListBase layers;                /* bGPDlayers */
+       int flag;                               /* settings for this datablock 
*/
+       
+       /* not-saved stroke buffer data (only used during paint-session) 
+        *      - buffer must be initialised before use, but freed after 
+        *        whole paint operation is over
+        */
+       short sbuffer_size;                     /* number of elements currently 
in cache */
+       short sbuffer_sflag;            /* flags for stroke that cache 
represents */
+       bGPDspoint *sbuffer;            /* stroke buffer (can hold 
GP_STROKE_BUFFER_MAX) */
+} bGPdata;
+
+/* bGPdata->flag */
+       /* draw this datablock's data (not used) */
+#define GP_DATA_DISP           (1<<0)
+       /* show debugging info in viewport (i.e. status print) */
+#define GP_DATA_DISPINFO       (1<<1)
+       /* is the block being shown in Action Editor */
+#define GP_DATA_EDITTIME       (1<<2)
+       /* is the block overriding all clicks? */
+#define GP_DATA_EDITPAINT      (1<<3)
+       /* new strokes are added in viewport space */
+#define GP_DATA_VIEWALIGN      (1<<4)
+
+#endif /*  DNA_GPENCIL_TYPES_H */


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to