diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-13 00:16:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-13 00:16:53 +0300 |
commit | bdfe7d89e2f1292644577972c716931b4ce3c6c3 (patch) | |
tree | d00eb50b749cb001e2b08272c91791e66740b05d /source/blender/blenkernel/BKE_bmeshCustomData.h | |
parent | 78a1c27c4a6abe0ed31ca93ad21910f3df04da56 (diff) | |
parent | 7e4db234cee71ead34ee81a12e27da4bd548eb4b (diff) |
Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416
Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
later added in trunk also, but reverted partially, specifically revision
16683. I have left out this reversion in the 2.5 branch since I think it is
needed there.
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
-W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
differently. Since this is changed so much, and I don't think those fixes
would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
initialized when running with -P. The code that initializes the screen there
I had to disable, that can't work in 2.5 anymore but left it commented as a
reminder.
Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.
Still to be done:
* Go over files and functions that were moved to a different location but could
still use changes that were done in trunk.
Diffstat (limited to 'source/blender/blenkernel/BKE_bmeshCustomData.h')
-rw-r--r-- | source/blender/blenkernel/BKE_bmeshCustomData.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h new file mode 100644 index 00000000000..4f5f2641f54 --- /dev/null +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -0,0 +1,108 @@ +/** + * BKE_bmesh.h jan 2007 + * + * BMesh modeler structure and functions. + * + * $Id: BKE_bmesh.h,v 1.00 2007/01/17 17:42:01 Briggs Exp $ + * + * ***** 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. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * 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) 2004 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Geoffrey Bantle. + * + * ***** END GPL LICENSE BLOCK ***** + */ + + +#ifndef BKE_BMESHCUSTOMDATA_H +#define BKE_BMESHCUSTOMDATA_H + +struct BLI_mempool; + +/*Custom Data Types and defines + Eventual plan is to move almost everything to custom data and let caller + decide when making the mesh what layers they want to store in the mesh + + This stuff should probably go in a seperate file.... +*/ + +#define BME_CD_FACETEX 0 /*Image texture/texface*/ +#define BME_CD_LOOPTEX 1 /*UV coordinates*/ +#define BME_CD_LOOPCOL 2 /*Vcolors*/ +#define BME_CD_DEFORMVERT 3 /*Vertex Group/Weights*/ +#define BME_CD_NUMTYPES 4 + +typedef struct BME_CustomDataLayer { + int type; /* type of data in layer */ + int offset; /* offset of layer in block */ + int active; /* offset of active layer*/ + char name[32]; /* layer name */ +} BME_CustomDataLayer; + +typedef struct BME_CustomData { + struct BME_CustomDataLayer *layers; /*Custom Data Layers*/ + struct BLI_mempool *pool; /*pool for alloc of blocks*/ + int totlayer, totsize; /*total layers and total size in bytes of each block*/ +} BME_CustomData; + +typedef struct BME_CustomDataInit{ + int layout[BME_CD_NUMTYPES]; + int active[BME_CD_NUMTYPES]; + int totlayers; + char *nametemplate; +} BME_CustomDataInit; + +/*Custom data types*/ +typedef struct BME_DeformWeight { + int def_nr; + float weight; +} BME_DeformWeight; + +typedef struct BME_DeformVert { + struct BME_DeformWeight *dw; + int totweight; +} BME_DeformVert; + +typedef struct BME_facetex{ + struct Image *tpage; + char flag, transp; + short mode, tile, unwrap; +}BME_facetex; + +typedef struct BME_looptex{ + float u, v; +}BME_looptex; + +typedef struct BME_loopcol{ + char r, g, b, a; +}BME_loopcol; + +/*CUSTOM DATA API*/ +void BME_CD_Create(struct BME_CustomData *data, struct BME_CustomDataInit *init, int initalloc); +void BME_CD_Free(struct BME_CustomData *data); +void BME_CD_free_block(struct BME_CustomData *data, void **block); +void BME_CD_copy_data(const struct BME_CustomData *source, struct BME_CustomData *dest, void *src_block, void **dest_block); +void BME_CD_set_default(struct BME_CustomData *data, void **block); + +#endif |