2022-02-10 23:07:11 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
* Copyright 2001-2002 NaN Holding BV. All rights reserved. */
|
2008-07-04 19:59:16 +02:00
|
|
|
|
2019-02-17 22:08:12 +01:00
|
|
|
/** \file
|
|
|
|
* \ingroup DNA
|
2013-03-02 08:27:19 +01:00
|
|
|
*
|
|
|
|
* Used for custom mesh data types (stored per vert/edge/loop/face)
|
2011-02-17 06:57:18 +01:00
|
|
|
*/
|
|
|
|
|
2012-02-17 19:59:41 +01:00
|
|
|
#pragma once
|
2006-11-11 17:38:37 +01:00
|
|
|
|
2020-05-08 18:16:39 +02:00
|
|
|
#include "DNA_defs.h"
|
|
|
|
|
2010-10-05 02:05:14 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-01-05 14:05:30 +01:00
|
|
|
/** Workaround to forward-declare C++ type in C header. */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
namespace blender::bke {
|
|
|
|
class AnonymousAttributeID;
|
|
|
|
} // namespace blender::bke
|
|
|
|
using AnonymousAttributeIDHandle = blender::bke::AnonymousAttributeID;
|
|
|
|
#else
|
|
|
|
typedef struct AnonymousAttributeIDHandle AnonymousAttributeIDHandle;
|
|
|
|
#endif
|
2021-09-09 12:54:20 +02:00
|
|
|
|
2019-11-24 15:14:39 +01:00
|
|
|
/** Descriptor and storage for a custom data layer. */
|
2006-11-11 17:38:37 +01:00
|
|
|
typedef struct CustomDataLayer {
|
2019-01-07 12:19:13 +01:00
|
|
|
/** Type of data in layer. */
|
|
|
|
int type;
|
|
|
|
/** In editmode, offset of layer in block. */
|
|
|
|
int offset;
|
|
|
|
/** General purpose flag. */
|
|
|
|
int flag;
|
|
|
|
/** Number of the active layer of this type. */
|
|
|
|
int active;
|
2019-08-01 05:53:25 +02:00
|
|
|
/** Number of the layer to render. */
|
2019-01-07 12:19:13 +01:00
|
|
|
int active_rnd;
|
2019-08-01 05:53:25 +02:00
|
|
|
/** Number of the layer to render. */
|
2019-01-07 12:19:13 +01:00
|
|
|
int active_clone;
|
2019-08-01 05:53:25 +02:00
|
|
|
/** Number of the layer to render. */
|
2019-01-07 12:19:13 +01:00
|
|
|
int active_mask;
|
2019-08-01 05:53:25 +02:00
|
|
|
/** Shape keyblock unique id reference. */
|
2019-01-07 12:19:13 +01:00
|
|
|
int uid;
|
|
|
|
/** Layer name, MAX_CUSTOMDATA_LAYER_NAME. */
|
|
|
|
char name[64];
|
|
|
|
/** Layer data. */
|
|
|
|
void *data;
|
2021-09-09 12:54:20 +02:00
|
|
|
/**
|
2023-01-05 14:05:30 +01:00
|
|
|
* Run-time identifier for this layer. Can be used to retrieve information about where this
|
|
|
|
* attribute was created.
|
2021-09-09 12:54:20 +02:00
|
|
|
*/
|
2023-01-05 14:05:30 +01:00
|
|
|
const AnonymousAttributeIDHandle *anonymous_id;
|
2006-11-11 17:38:37 +01:00
|
|
|
} CustomDataLayer;
|
|
|
|
|
2012-01-11 09:51:06 +01:00
|
|
|
#define MAX_CUSTOMDATA_LAYER_NAME 64
|
|
|
|
|
2009-11-25 15:27:50 +01:00
|
|
|
typedef struct CustomDataExternal {
|
2019-01-07 12:19:13 +01:00
|
|
|
/** FILE_MAX. */
|
2022-03-25 02:04:22 +01:00
|
|
|
char filepath[1024];
|
2009-11-25 15:27:50 +01:00
|
|
|
} CustomDataExternal;
|
|
|
|
|
2019-11-24 15:14:39 +01:00
|
|
|
/**
|
|
|
|
* Structure which stores custom element data associated with mesh elements
|
2012-03-08 05:12:11 +01:00
|
|
|
* (vertices, edges or faces). The custom data is organized into a series of
|
2019-11-24 15:14:39 +01:00
|
|
|
* layers, each with a data type (e.g. MTFace, MDeformVert, etc.).
|
|
|
|
*/
|
2006-11-11 17:38:37 +01:00
|
|
|
typedef struct CustomData {
|
2019-01-07 12:19:13 +01:00
|
|
|
/** CustomDataLayers, ordered by type. */
|
|
|
|
CustomDataLayer *layers;
|
|
|
|
/**
|
|
|
|
* runtime only! - maps types to indices of first layer of that type,
|
2021-06-22 19:42:32 +02:00
|
|
|
* MUST be >= CD_NUMTYPES, but we can't use a define here.
|
2019-01-07 12:19:13 +01:00
|
|
|
* Correct size is ensured in CustomData_update_typemap assert().
|
|
|
|
*/
|
2021-09-24 07:42:36 +02:00
|
|
|
int typemap[52];
|
|
|
|
char _pad[4];
|
2019-01-07 12:19:13 +01:00
|
|
|
/** Number of layers, size of layers array. */
|
|
|
|
int totlayer, maxlayer;
|
|
|
|
/** In editmode, total size of all data layers. */
|
|
|
|
int totsize;
|
|
|
|
/** (BMesh Only): Memory pool for allocation of blocks. */
|
|
|
|
struct BLI_mempool *pool;
|
|
|
|
/** External file storing customdata layers. */
|
|
|
|
CustomDataExternal *external;
|
2006-11-11 17:38:37 +01:00
|
|
|
} CustomData;
|
|
|
|
|
2022-04-05 00:00:20 +02:00
|
|
|
/** #CustomData.type */
|
2022-06-01 06:38:06 +02:00
|
|
|
typedef enum eCustomDataType {
|
2016-05-22 18:24:53 +02:00
|
|
|
/* Used by GLSL attributes in the cases when we need a delayed CD type
|
|
|
|
* assignment (in the cases when we don't know in advance which layer
|
|
|
|
* we are addressing).
|
|
|
|
*/
|
|
|
|
CD_AUTO_FROM_NAME = -1,
|
|
|
|
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_MVERT = 0,
|
2019-12-16 23:42:12 +01:00
|
|
|
#ifdef DNA_DEPRECATED_ALLOW
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_MSTICKY = 1, /* DEPRECATED */
|
2015-07-10 08:47:39 +02:00
|
|
|
#endif
|
2022-12-20 14:17:30 +01:00
|
|
|
CD_MDEFORMVERT = 2, /* Array of `MDeformVert`. */
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_MEDGE = 3,
|
|
|
|
CD_MFACE = 4,
|
|
|
|
CD_MTFACE = 5,
|
|
|
|
CD_MCOL = 6,
|
|
|
|
CD_ORIGINDEX = 7,
|
2022-02-22 18:43:53 +01:00
|
|
|
/**
|
|
|
|
* Used for derived face corner normals on mesh `ldata`, since currently they are not computed
|
|
|
|
* lazily. Derived vertex and polygon normals are stored in #Mesh_Runtime.
|
|
|
|
*/
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_NORMAL = 8,
|
2017-05-30 09:58:24 +02:00
|
|
|
CD_FACEMAP = 9, /* exclusive face group, each face can only be part of one */
|
2020-06-10 15:47:31 +02:00
|
|
|
CD_PROP_FLOAT = 10,
|
|
|
|
CD_PROP_INT32 = 11,
|
|
|
|
CD_PROP_STRING = 12,
|
2019-07-03 15:43:05 +02:00
|
|
|
CD_ORIGSPACE = 13, /* for modifier stack face location mapping */
|
|
|
|
CD_ORCO = 14, /* undeformed vertex coordinates, normalized to 0..1 range */
|
2019-12-16 23:42:12 +01:00
|
|
|
#ifdef DNA_DEPRECATED_ALLOW
|
2019-07-03 15:43:05 +02:00
|
|
|
CD_MTEXPOLY = 15, /* deprecated */
|
|
|
|
#endif
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_MLOOPUV = 16,
|
2022-04-20 16:10:10 +02:00
|
|
|
CD_PROP_BYTE_COLOR = 17,
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_TANGENT = 18,
|
|
|
|
CD_MDISPS = 19,
|
2022-11-01 02:24:06 +01:00
|
|
|
CD_PREVIEW_MCOL = 20, /* For displaying weight-paint colors. */
|
2020-02-20 00:21:23 +01:00
|
|
|
/* CD_ID_MCOL = 21, */
|
|
|
|
/* CD_TEXTURE_MLOOPCOL = 22, */ /* UNUSED */
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_CLOTH_ORCO = 23,
|
2020-09-10 11:36:47 +02:00
|
|
|
/* CD_RECAST = 24, */ /* UNUSED */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_MPOLY = 25,
|
|
|
|
CD_MLOOP = 26,
|
|
|
|
CD_SHAPE_KEYINDEX = 27,
|
|
|
|
CD_SHAPEKEY = 28,
|
|
|
|
CD_BWEIGHT = 29,
|
2022-09-23 16:02:05 +02:00
|
|
|
/** Subdivision sharpness data per edge or per vertex. */
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_CREASE = 30,
|
|
|
|
CD_ORIGSPACE_MLOOP = 31,
|
|
|
|
CD_PREVIEW_MLOOPCOL = 32,
|
|
|
|
CD_BM_ELEM_PYPTR = 33,
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-09-10 15:13:04 +02:00
|
|
|
CD_PAINT_MASK = 34,
|
|
|
|
CD_GRID_PAINT_MASK = 35,
|
|
|
|
CD_MVERT_SKIN = 36,
|
|
|
|
CD_FREESTYLE_EDGE = 37,
|
|
|
|
CD_FREESTYLE_FACE = 38,
|
2014-01-11 11:31:44 +01:00
|
|
|
CD_MLOOPTANGENT = 39,
|
2014-04-13 12:18:51 +02:00
|
|
|
CD_TESSLOOPNORMAL = 40,
|
Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.
See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.
Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.
Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.
Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:24:48 +01:00
|
|
|
CD_CUSTOMLOOPNORMAL = 41,
|
2020-03-05 14:53:23 +01:00
|
|
|
CD_SCULPT_FACE_SETS = 42,
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2022-02-04 17:29:11 +01:00
|
|
|
/* CD_LOCATION = 43, */ /* UNUSED */
|
|
|
|
/* CD_RADIUS = 44, */ /* UNUSED */
|
|
|
|
CD_PROP_INT8 = 45,
|
2022-02-03 21:35:51 +01:00
|
|
|
/* CD_HAIRMAPPING = 46, */ /* UNUSED, can be reused. */
|
2020-03-17 14:41:48 +01:00
|
|
|
|
2020-05-27 20:04:09 +02:00
|
|
|
CD_PROP_COLOR = 47,
|
2020-07-15 16:42:17 +02:00
|
|
|
CD_PROP_FLOAT3 = 48,
|
|
|
|
CD_PROP_FLOAT2 = 49,
|
2020-12-16 19:33:13 +01:00
|
|
|
CD_PROP_BOOL = 50,
|
|
|
|
|
2021-09-24 07:42:36 +02:00
|
|
|
CD_HAIRLENGTH = 51,
|
|
|
|
|
|
|
|
CD_NUMTYPES = 52,
|
2022-06-01 06:38:06 +02:00
|
|
|
} eCustomDataType;
|
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
|
|
|
|
2022-06-01 06:38:06 +02:00
|
|
|
/* Bits for eCustomDataMask */
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_MVERT (1 << CD_MVERT)
|
2015-07-10 08:47:39 +02:00
|
|
|
// #define CD_MASK_MSTICKY (1 << CD_MSTICKY) /* DEPRECATED */
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_MDEFORMVERT (1 << CD_MDEFORMVERT)
|
|
|
|
#define CD_MASK_MEDGE (1 << CD_MEDGE)
|
|
|
|
#define CD_MASK_MFACE (1 << CD_MFACE)
|
|
|
|
#define CD_MASK_MTFACE (1 << CD_MTFACE)
|
|
|
|
#define CD_MASK_MCOL (1 << CD_MCOL)
|
|
|
|
#define CD_MASK_ORIGINDEX (1 << CD_ORIGINDEX)
|
|
|
|
#define CD_MASK_NORMAL (1 << CD_NORMAL)
|
2017-05-30 09:58:24 +02:00
|
|
|
#define CD_MASK_FACEMAP (1 << CD_FACEMAP)
|
2020-06-10 15:47:31 +02:00
|
|
|
#define CD_MASK_PROP_FLOAT (1 << CD_PROP_FLOAT)
|
|
|
|
#define CD_MASK_PROP_INT32 (1 << CD_PROP_INT32)
|
|
|
|
#define CD_MASK_PROP_STRING (1 << CD_PROP_STRING)
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_ORIGSPACE (1 << CD_ORIGSPACE)
|
|
|
|
#define CD_MASK_ORCO (1 << CD_ORCO)
|
2017-05-25 07:11:00 +02:00
|
|
|
// #define CD_MASK_MTEXPOLY (1 << CD_MTEXPOLY) /* DEPRECATED */
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_MLOOPUV (1 << CD_MLOOPUV)
|
2022-04-20 16:10:10 +02:00
|
|
|
#define CD_MASK_PROP_BYTE_COLOR (1 << CD_PROP_BYTE_COLOR)
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_TANGENT (1 << CD_TANGENT)
|
|
|
|
#define CD_MASK_MDISPS (1 << CD_MDISPS)
|
|
|
|
#define CD_MASK_PREVIEW_MCOL (1 << CD_PREVIEW_MCOL)
|
|
|
|
#define CD_MASK_CLOTH_ORCO (1 << CD_CLOTH_ORCO)
|
2020-09-10 11:36:47 +02:00
|
|
|
// #define CD_MASK_RECAST (1 << CD_RECAST) /* DEPRECATED */
|
2011-12-28 14:11:46 +01:00
|
|
|
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_MPOLY (1 << CD_MPOLY)
|
|
|
|
#define CD_MASK_MLOOP (1 << CD_MLOOP)
|
|
|
|
#define CD_MASK_SHAPE_KEYINDEX (1 << CD_SHAPE_KEYINDEX)
|
|
|
|
#define CD_MASK_SHAPEKEY (1 << CD_SHAPEKEY)
|
|
|
|
#define CD_MASK_BWEIGHT (1 << CD_BWEIGHT)
|
|
|
|
#define CD_MASK_CREASE (1 << CD_CREASE)
|
|
|
|
#define CD_MASK_ORIGSPACE_MLOOP (1LL << CD_ORIGSPACE_MLOOP)
|
|
|
|
#define CD_MASK_PREVIEW_MLOOPCOL (1LL << CD_PREVIEW_MLOOPCOL)
|
|
|
|
#define CD_MASK_BM_ELEM_PYPTR (1LL << CD_BM_ELEM_PYPTR)
|
2006-12-05 18:42:03 +01:00
|
|
|
|
2013-09-12 22:43:29 +02:00
|
|
|
#define CD_MASK_PAINT_MASK (1LL << CD_PAINT_MASK)
|
|
|
|
#define CD_MASK_GRID_PAINT_MASK (1LL << CD_GRID_PAINT_MASK)
|
|
|
|
#define CD_MASK_MVERT_SKIN (1LL << CD_MVERT_SKIN)
|
|
|
|
#define CD_MASK_FREESTYLE_EDGE (1LL << CD_FREESTYLE_EDGE)
|
|
|
|
#define CD_MASK_FREESTYLE_FACE (1LL << CD_FREESTYLE_FACE)
|
2014-04-13 12:18:51 +02:00
|
|
|
#define CD_MASK_MLOOPTANGENT (1LL << CD_MLOOPTANGENT)
|
|
|
|
#define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL)
|
Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.
See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.
Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.
Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.
Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:24:48 +01:00
|
|
|
#define CD_MASK_CUSTOMLOOPNORMAL (1LL << CD_CUSTOMLOOPNORMAL)
|
Sculpt Vertex Colors: Initial implementation
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.
This commit includes:
- SCULPT_UNDO_COLOR for undo support in sculpt mode
- SCULPT_UPDATE_COLOR and PBVH flags and rendering
- Sculpt Color API functions
- Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
- Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
- Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
- Remesher reprojection in the Voxel Remehser
- Paint Brush and Smear Brush with color smoothing in alt-smooth mode
- Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
- Color Filter
- Color picker (uses S shortcut, replaces smooth)
- Color selector in the top bar
Reviewed By: brecht
Maniphest Tasks: T72866
Differential Revision: https://developer.blender.org/D5975
2020-06-22 20:05:28 +02:00
|
|
|
#define CD_MASK_PROP_COLOR (1ULL << CD_PROP_COLOR)
|
2020-07-15 16:42:17 +02:00
|
|
|
#define CD_MASK_PROP_FLOAT3 (1ULL << CD_PROP_FLOAT3)
|
|
|
|
#define CD_MASK_PROP_FLOAT2 (1ULL << CD_PROP_FLOAT2)
|
2020-12-16 19:33:13 +01:00
|
|
|
#define CD_MASK_PROP_BOOL (1ULL << CD_PROP_BOOL)
|
2022-02-04 17:29:11 +01:00
|
|
|
#define CD_MASK_PROP_INT8 (1ULL << CD_PROP_INT8)
|
2012-05-10 22:33:24 +02:00
|
|
|
|
2021-09-24 07:42:36 +02:00
|
|
|
#define CD_MASK_HAIRLENGTH (1ULL << CD_HAIRLENGTH)
|
|
|
|
|
2022-11-01 02:24:06 +01:00
|
|
|
/** Multi-resolution loop data. */
|
2019-08-27 18:17:27 +02:00
|
|
|
#define CD_MASK_MULTIRES_GRIDS (CD_MASK_MDISPS | CD_GRID_PAINT_MASK)
|
|
|
|
|
2020-03-17 14:41:48 +01:00
|
|
|
/* All data layers. */
|
|
|
|
#define CD_MASK_ALL (~0LL)
|
|
|
|
|
2020-07-03 15:30:04 +02:00
|
|
|
/* All generic attributes. */
|
|
|
|
#define CD_MASK_PROP_ALL \
|
|
|
|
(CD_MASK_PROP_FLOAT | CD_MASK_PROP_FLOAT2 | CD_MASK_PROP_FLOAT3 | CD_MASK_PROP_INT32 | \
|
2022-04-20 16:10:10 +02:00
|
|
|
CD_MASK_PROP_COLOR | CD_MASK_PROP_STRING | CD_MASK_PROP_BYTE_COLOR | CD_MASK_PROP_BOOL | \
|
2022-02-04 17:29:11 +01:00
|
|
|
CD_MASK_PROP_INT8)
|
2020-07-03 15:30:04 +02:00
|
|
|
|
2022-04-05 20:42:55 +02:00
|
|
|
/* All color attributes */
|
2022-04-20 16:10:10 +02:00
|
|
|
#define CD_MASK_COLOR_ALL (CD_MASK_PROP_COLOR | CD_MASK_PROP_BYTE_COLOR)
|
2022-04-05 20:42:55 +02:00
|
|
|
|
Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.
Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!
As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).
Reviewers: brecht, campbellbarton, sergey
Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:13:40 +01:00
|
|
|
typedef struct CustomData_MeshMasks {
|
|
|
|
uint64_t vmask;
|
|
|
|
uint64_t emask;
|
|
|
|
uint64_t fmask;
|
|
|
|
uint64_t pmask;
|
|
|
|
uint64_t lmask;
|
|
|
|
} CustomData_MeshMasks;
|
|
|
|
|
2022-04-05 00:00:20 +02:00
|
|
|
/** #CustomData.flag */
|
2013-09-10 15:13:04 +02:00
|
|
|
enum {
|
|
|
|
/* Indicates layer should not be copied by CustomData_from_template or CustomData_copy_data */
|
|
|
|
CD_FLAG_NOCOPY = (1 << 0),
|
|
|
|
/* Indicates layer should not be freed (for layers backed by external data) */
|
|
|
|
CD_FLAG_NOFREE = (1 << 1),
|
|
|
|
/* Indicates the layer is only temporary, also implies no copy */
|
|
|
|
CD_FLAG_TEMPORARY = ((1 << 2) | CD_FLAG_NOCOPY),
|
|
|
|
/* Indicates the layer is stored in an external file */
|
|
|
|
CD_FLAG_EXTERNAL = (1 << 3),
|
|
|
|
/* Indicates external data is read into memory */
|
|
|
|
CD_FLAG_IN_MEMORY = (1 << 4),
|
2022-12-15 21:18:57 +01:00
|
|
|
#ifdef DNA_DEPRECATED_ALLOW
|
2022-04-05 20:42:55 +02:00
|
|
|
CD_FLAG_COLOR_ACTIVE = (1 << 5),
|
|
|
|
CD_FLAG_COLOR_RENDER = (1 << 6)
|
2022-12-15 21:18:57 +01:00
|
|
|
#endif
|
2013-09-10 15:13:04 +02:00
|
|
|
};
|
2006-11-11 17:38:37 +01:00
|
|
|
|
2006-12-21 14:47:27 +01:00
|
|
|
/* Limits */
|
2013-09-10 15:13:04 +02:00
|
|
|
#define MAX_MTFACE 8
|
2006-12-21 14:47:27 +01:00
|
|
|
|
2014-04-16 04:31:02 +02:00
|
|
|
#define DYNTOPO_NODE_NONE -1
|
|
|
|
|
2010-10-05 02:05:14 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|