2004-03-20 23:55:42 +01:00
|
|
|
/**
|
|
|
|
* $Id$
|
|
|
|
*
|
2008-04-17 00:40:48 +02:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2004-03-20 23:55:42 +01:00
|
|
|
*
|
|
|
|
* 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
|
2008-04-17 00:40:48 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2004-03-20 23:55:42 +01:00
|
|
|
*
|
|
|
|
* 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,
|
2010-02-12 14:34:04 +01:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2004-03-20 23:55:42 +01:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
2008-04-17 00:40:48 +02:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2004-03-20 23:55:42 +01:00
|
|
|
*/
|
|
|
|
#ifndef DNA_MESHDATA_TYPES_H
|
|
|
|
#define DNA_MESHDATA_TYPES_H
|
|
|
|
|
2006-12-03 20:59:18 +01:00
|
|
|
#include "DNA_customdata_types.h"
|
2008-12-20 11:02:00 +01:00
|
|
|
#include "DNA_listBase.h"
|
2006-12-03 20:59:18 +01:00
|
|
|
|
2004-03-20 23:55:42 +01:00
|
|
|
struct Bone;
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
struct Image;
|
2004-03-20 23:55:42 +01:00
|
|
|
|
|
|
|
typedef struct MFace {
|
|
|
|
unsigned int v1, v2, v3, v4;
|
2009-07-13 02:40:20 +02:00
|
|
|
short mat_nr;
|
2005-09-22 19:00:58 +02:00
|
|
|
char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */
|
2004-03-20 23:55:42 +01:00
|
|
|
} MFace;
|
|
|
|
|
2004-07-08 22:38:27 +02:00
|
|
|
typedef struct MEdge {
|
|
|
|
unsigned int v1, v2;
|
2008-02-23 23:11:16 +01:00
|
|
|
char crease, bweight;
|
2004-07-08 22:38:27 +02:00
|
|
|
short flag;
|
|
|
|
} MEdge;
|
|
|
|
|
2004-03-20 23:55:42 +01:00
|
|
|
typedef struct MDeformWeight {
|
|
|
|
int def_nr;
|
|
|
|
float weight;
|
|
|
|
} MDeformWeight;
|
|
|
|
|
|
|
|
typedef struct MDeformVert {
|
|
|
|
struct MDeformWeight *dw;
|
|
|
|
int totweight;
|
2007-04-10 13:45:07 +02:00
|
|
|
int flag; /* flag only in use for weightpaint now */
|
2004-03-20 23:55:42 +01:00
|
|
|
} MDeformVert;
|
|
|
|
|
|
|
|
typedef struct MVert {
|
|
|
|
float co[3];
|
|
|
|
short no[3];
|
2011-02-07 14:02:44 +01:00
|
|
|
char flag, bweight;
|
2004-03-20 23:55:42 +01:00
|
|
|
} MVert;
|
|
|
|
|
2007-07-19 02:42:01 +02:00
|
|
|
/* at the moment alpha is abused for vertex painting
|
|
|
|
* and not used for transperency, note that red and blue are swapped */
|
2004-03-20 23:55:42 +01:00
|
|
|
typedef struct MCol {
|
2007-07-19 02:42:01 +02:00
|
|
|
char a, r, g, b;
|
2004-03-20 23:55:42 +01:00
|
|
|
} MCol;
|
|
|
|
|
2008-07-04 19:59:16 +02:00
|
|
|
/*bmesh custom data stuff*/
|
|
|
|
typedef struct MTexPoly{
|
|
|
|
struct Image *tpage;
|
|
|
|
char flag, transp;
|
|
|
|
short mode,tile,unwrap;
|
|
|
|
}MTexPoly;
|
|
|
|
|
|
|
|
typedef struct MLoopUV{
|
|
|
|
float uv[2];
|
|
|
|
}MLoopUV;
|
|
|
|
|
|
|
|
typedef struct MLoopCol{
|
|
|
|
char a, r, g, b;
|
2008-09-02 18:39:03 +02:00
|
|
|
int pad; /*waste!*/
|
2008-07-04 19:59:16 +02:00
|
|
|
}MLoopCol;
|
|
|
|
|
2004-03-20 23:55:42 +01:00
|
|
|
typedef struct MSticky {
|
|
|
|
float co[2];
|
|
|
|
} MSticky;
|
|
|
|
|
2006-04-03 21:02:22 +02:00
|
|
|
typedef struct MSelect {
|
|
|
|
int index;
|
|
|
|
int type;
|
|
|
|
} MSelect;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
typedef struct MTFace {
|
|
|
|
float uv[4][2];
|
|
|
|
struct Image *tpage;
|
|
|
|
char flag, transp;
|
|
|
|
short mode, tile, unwrap;
|
|
|
|
} MTFace;
|
|
|
|
|
2007-06-04 21:18:19 +02:00
|
|
|
/*Custom Data Properties*/
|
|
|
|
typedef struct MFloatProperty{
|
|
|
|
float f;
|
|
|
|
} MFloatProperty;
|
|
|
|
typedef struct MIntProperty{
|
|
|
|
int i;
|
|
|
|
} MIntProperty;
|
|
|
|
typedef struct MStringProperty{
|
|
|
|
char s[256];
|
|
|
|
} MStringProperty;
|
|
|
|
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
typedef struct OrigSpaceFace {
|
|
|
|
float uv[4][2];
|
|
|
|
} OrigSpaceFace;
|
2007-06-04 21:18:19 +02:00
|
|
|
|
2009-01-06 19:59:03 +01:00
|
|
|
typedef struct MDisps {
|
|
|
|
/* Strange bug in SDNA: if disps pointer comes first, it fails to see totdisp */
|
|
|
|
int totdisp;
|
|
|
|
char pad[4];
|
|
|
|
float (*disps)[3];
|
|
|
|
} MDisps;
|
|
|
|
|
|
|
|
/** Multires structs kept for compatibility with old files **/
|
2006-11-06 02:08:26 +01:00
|
|
|
typedef struct MultiresCol {
|
2007-01-10 07:09:10 +01:00
|
|
|
float a, r, g, b;
|
2006-11-06 02:08:26 +01:00
|
|
|
} MultiresCol;
|
2007-01-10 07:09:10 +01:00
|
|
|
typedef struct MultiresColFace {
|
|
|
|
/* vertex colors */
|
|
|
|
MultiresCol col[4];
|
|
|
|
} MultiresColFace;
|
2006-11-06 02:08:26 +01:00
|
|
|
typedef struct MultiresFace {
|
|
|
|
unsigned int v[4];
|
2009-07-13 02:40:20 +02:00
|
|
|
unsigned int mid;
|
2006-12-11 02:54:34 +01:00
|
|
|
char flag, mat_nr, pad[2];
|
2006-11-06 02:08:26 +01:00
|
|
|
} MultiresFace;
|
|
|
|
typedef struct MultiresEdge {
|
|
|
|
unsigned int v[2];
|
|
|
|
unsigned int mid;
|
|
|
|
} MultiresEdge;
|
|
|
|
|
2006-12-20 09:12:32 +01:00
|
|
|
struct MultiresMapNode;
|
2006-11-06 02:08:26 +01:00
|
|
|
typedef struct MultiresLevel {
|
|
|
|
struct MultiresLevel *next, *prev;
|
|
|
|
|
|
|
|
MultiresFace *faces;
|
2007-01-10 07:09:10 +01:00
|
|
|
MultiresColFace *colfaces;
|
2006-11-06 02:08:26 +01:00
|
|
|
MultiresEdge *edges;
|
2007-06-10 23:51:11 +02:00
|
|
|
|
2006-11-06 02:08:26 +01:00
|
|
|
unsigned int totvert, totface, totedge, pad;
|
2007-06-01 04:21:11 +02:00
|
|
|
|
2009-01-06 19:59:03 +01:00
|
|
|
/* Kept for compatibility with even older files */
|
2007-06-01 04:21:11 +02:00
|
|
|
MVert *verts;
|
2006-11-06 02:08:26 +01:00
|
|
|
} MultiresLevel;
|
|
|
|
|
|
|
|
typedef struct Multires {
|
|
|
|
ListBase levels;
|
2007-06-01 04:21:11 +02:00
|
|
|
MVert *verts;
|
|
|
|
|
2006-11-06 02:08:26 +01:00
|
|
|
unsigned char level_count, current, newlvl, edgelvl, pinlvl, renderlvl;
|
2008-02-09 21:50:25 +01:00
|
|
|
unsigned char use_col, flag;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
2006-12-31 11:36:48 +01:00
|
|
|
/* Special level 1 data that cannot be modified from other levels */
|
2007-01-10 07:09:10 +01:00
|
|
|
CustomData vdata;
|
|
|
|
CustomData fdata;
|
2006-12-31 11:36:48 +01:00
|
|
|
short *edge_flags;
|
2007-01-22 09:34:53 +01:00
|
|
|
char *edge_creases;
|
2006-11-06 02:08:26 +01:00
|
|
|
} Multires;
|
|
|
|
|
2009-01-06 19:59:03 +01:00
|
|
|
/** End Multires **/
|
|
|
|
|
2006-11-06 02:08:26 +01:00
|
|
|
typedef struct PartialVisibility {
|
|
|
|
unsigned int *vert_map; /* vert_map[Old Index]= New Index */
|
|
|
|
int *edge_map; /* edge_map[Old Index]= New Index, -1= hidden */
|
|
|
|
MFace *old_faces;
|
|
|
|
MEdge *old_edges;
|
|
|
|
unsigned int totface, totedge, totvert, pad;
|
|
|
|
} PartialVisibility;
|
|
|
|
|
2004-07-08 22:38:27 +02:00
|
|
|
/* mvert->flag (1=SELECT) */
|
2009-11-04 21:36:38 +01:00
|
|
|
#define ME_SPHERETEST 2
|
2009-12-21 02:02:08 +01:00
|
|
|
#define ME_VERT_TMP_TAG 4
|
2009-11-04 21:36:38 +01:00
|
|
|
#define ME_HIDE 16
|
2006-01-10 12:36:57 +01:00
|
|
|
#define ME_VERT_MERGED (1<<6)
|
2009-11-04 21:36:38 +01:00
|
|
|
#define ME_VERT_PBVH_UPDATE (1<<7)
|
2004-07-08 22:38:27 +02:00
|
|
|
|
|
|
|
/* medge->flag (1=SELECT)*/
|
2005-08-18 13:31:20 +02:00
|
|
|
#define ME_EDGEDRAW (1<<1)
|
|
|
|
#define ME_SEAM (1<<2)
|
|
|
|
#define ME_FGON (1<<3)
|
2007-04-10 13:45:07 +02:00
|
|
|
/* reserve 16 for ME_HIDE */
|
2005-08-18 13:31:20 +02:00
|
|
|
#define ME_EDGERENDER (1<<5)
|
|
|
|
#define ME_LOOSEEDGE (1<<7)
|
2006-02-08 22:01:00 +01:00
|
|
|
#define ME_SEAM_LAST (1<<8)
|
2006-08-28 03:12:36 +02:00
|
|
|
#define ME_SHARP (1<<9)
|
2004-07-08 22:38:27 +02:00
|
|
|
|
|
|
|
/* puno = vertexnormal (mface) */
|
2006-12-05 17:44:57 +01:00
|
|
|
/* render assumes flips to be ordered like this */
|
2004-07-08 22:38:27 +02:00
|
|
|
#define ME_FLIPV1 1
|
|
|
|
#define ME_FLIPV2 2
|
|
|
|
#define ME_FLIPV3 4
|
|
|
|
#define ME_FLIPV4 8
|
|
|
|
#define ME_PROJXY 16
|
|
|
|
#define ME_PROJXZ 32
|
|
|
|
#define ME_PROJYZ 64
|
|
|
|
|
|
|
|
/* edcode (mface) */
|
|
|
|
#define ME_V1V2 1
|
|
|
|
#define ME_V2V3 2
|
|
|
|
#define ME_V3V1 4
|
|
|
|
#define ME_V3V4 4
|
|
|
|
#define ME_V4V1 8
|
|
|
|
|
|
|
|
/* flag (mface) */
|
- convert all DerivedMesh map functions to use index based
mapping (instead of Edit{Vert,Edge,Face} pointers)
- dropped convertToDispListMeshMapped (whew, glad of it too)
- added DerivedMesh drawMappedFaces function
- dropped EM suffix for DerivedMesh functions, it was neither
particularly correct nor descriptive
- converted test_index_mface to test_index_face that also corrects
MCol and TFace. Good thing we had three versions of this routine,
you never know when one might burn down.
- removed flipnorm_mesh, not used anymore (and was incorrect to
boot)
- Getting face select to work with modifiers turned out to be much
more complicated than expected. Reworked mapping architecture for
modifiers - basically elements in a DispListMesh are now required
to be stored in an order that corresponds exactly to original
ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
that is set on each element that is set on the first derived element
of each original element. I can't say the code to follow these
requirements for subsurf is particularly transparent, but on the
upside it is a reasonably consistent and simple system that is memory
efficient and allows keeping the DispListMesh structure.
- rewrote mirror modifier to be simpler/conform to new requirements
for mapped DispListMesh structure. This also means that mirror interacts
much better with incremental subsurf calculation (it used to recalc
one entire side on any topology change, now it generally avoids that).
- added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
functions to handle mapping indices back into appropriate EditMesh
structures.
- bug fix, make edges didn't recalc object data
- bug fix, initial image assignment to TFace's didn't recalc object data
- new feature, added circle select support for FACESELECT
- bug fix, creating new faces in editmode duplicated the TFACE active
flag - but there should only be one active tface
- bug fix, possible crash when deleting all faces in faceselect mode
on mesh with tfaces...
Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
2005-08-20 05:08:23 +02:00
|
|
|
#define ME_SMOOTH 1
|
|
|
|
#define ME_FACE_SEL 2
|
|
|
|
/* flag ME_HIDE==16 is used here too */
|
2006-04-03 21:02:22 +02:00
|
|
|
/* mselect->type */
|
|
|
|
#define ME_VSEl 0
|
|
|
|
#define ME_ESEl 1
|
|
|
|
#define ME_FSEL 2
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
|
|
|
|
/* mtface->flag */
|
2007-04-29 15:39:46 +02:00
|
|
|
#define TF_SELECT 1 /* use MFace hide flag (after 2.43), should be able to reuse after 2.44 */
|
2007-09-22 19:54:13 +02:00
|
|
|
#define TF_ACTIVE 2 /* deprecated! */
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
#define TF_SEL1 4
|
|
|
|
#define TF_SEL2 8
|
|
|
|
#define TF_SEL3 16
|
|
|
|
#define TF_SEL4 32
|
2007-04-29 15:39:46 +02:00
|
|
|
#define TF_HIDE 64 /* unused, same as TF_SELECT */
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
|
|
|
|
/* mtface->mode */
|
|
|
|
#define TF_DYNAMIC 1
|
2008-07-29 17:48:31 +02:00
|
|
|
#define TF_ALPHASORT 2
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
#define TF_TEX 4
|
|
|
|
#define TF_SHAREDVERT 8
|
|
|
|
#define TF_LIGHT 16
|
|
|
|
|
|
|
|
#define TF_SHAREDCOL 64
|
2009-06-16 03:22:56 +02:00
|
|
|
#define TF_TILES 128 /* deprecated */
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
#define TF_BILLBOARD 256
|
|
|
|
#define TF_TWOSIDE 512
|
|
|
|
#define TF_INVISIBLE 1024
|
|
|
|
|
|
|
|
#define TF_OBCOL 2048
|
|
|
|
#define TF_BILLBOARD2 4096 /* with Z axis constraint */
|
|
|
|
#define TF_SHADOW 8192
|
|
|
|
#define TF_BMFONT 16384
|
|
|
|
|
2008-06-09 17:45:46 +02:00
|
|
|
/* mtface->transp, values 1-4 are used as flags in the GL, WARNING, TF_SUB cant work with this */
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
#define TF_SOLID 0
|
|
|
|
#define TF_ADD 1
|
|
|
|
#define TF_ALPHA 2
|
2008-06-09 17:45:46 +02:00
|
|
|
#define TF_CLIP 4 /* clipmap alpha/binary alpha all or nothing! */
|
2007-07-19 02:42:01 +02:00
|
|
|
|
|
|
|
/* sub is not available in the user interface anymore */
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
#define TF_SUB 3
|
|
|
|
|
2008-06-09 17:45:46 +02:00
|
|
|
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 05:28:02 +01:00
|
|
|
/* mtface->unwrap */
|
|
|
|
#define TF_DEPRECATED1 1
|
|
|
|
#define TF_DEPRECATED2 2
|
|
|
|
#define TF_DEPRECATED3 4
|
|
|
|
#define TF_DEPRECATED4 8
|
|
|
|
#define TF_PIN1 16
|
|
|
|
#define TF_PIN2 32
|
|
|
|
#define TF_PIN3 64
|
|
|
|
#define TF_PIN4 128
|
|
|
|
|
|
|
|
#endif
|