Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_mesh_types.h
| Show First 20 Lines • Show All 325 Lines • ▼ Show 20 Lines | |||||
| typedef enum eMeshSymmetryType { | typedef enum eMeshSymmetryType { | ||||
| ME_SYMMETRY_X = 1 << 0, | ME_SYMMETRY_X = 1 << 0, | ||||
| ME_SYMMETRY_Y = 1 << 1, | ME_SYMMETRY_Y = 1 << 1, | ||||
| ME_SYMMETRY_Z = 1 << 2, | ME_SYMMETRY_Z = 1 << 2, | ||||
| } eMeshSymmetryType; | } eMeshSymmetryType; | ||||
| #define MESH_MAX_VERTS 2000000000L | #define MESH_MAX_VERTS 2000000000L | ||||
| /** | |||||
| * Mesh Remapping Defines, used in #BKE_mesh_remap.h. | |||||
| * These fields need to be in DNA because they are used by the the data transfer modifier, | |||||
| * and therefore need to be accessed by the DNA defaults system. | |||||
| */ | |||||
| /* TODO: | |||||
| * Add other 'from/to' mapping sources, like e.g. using an UVMap, etc. | |||||
| * https://blenderartists.org/t/619105 | |||||
| * | |||||
| * We could also use similar topology mappings inside a same mesh | |||||
| * (cf. Campbell's 'select face islands from similar topology' wip work). | |||||
| * Also, users will have to check, whether we can get rid of some modes here, | |||||
| * not sure all will be useful! | |||||
| */ | |||||
| enum { | |||||
| MREMAP_USE_VERT = 1 << 4, | |||||
| MREMAP_USE_EDGE = 1 << 5, | |||||
| MREMAP_USE_LOOP = 1 << 6, | |||||
| MREMAP_USE_POLY = 1 << 7, | |||||
| MREMAP_USE_NEAREST = 1 << 8, | |||||
| MREMAP_USE_NORPROJ = 1 << 9, | |||||
| MREMAP_USE_INTERP = 1 << 10, | |||||
| MREMAP_USE_NORMAL = 1 << 11, | |||||
| /* ***** Target's vertices ***** */ | |||||
| MREMAP_MODE_VERT = 1 << 24, | |||||
| /* Nearest source vert. */ | |||||
| MREMAP_MODE_VERT_NEAREST = MREMAP_MODE_VERT | MREMAP_USE_VERT | MREMAP_USE_NEAREST, | |||||
| /* Nearest vertex of nearest edge. */ | |||||
| MREMAP_MODE_VERT_EDGE_NEAREST = MREMAP_MODE_VERT | MREMAP_USE_EDGE | MREMAP_USE_NEAREST, | |||||
| /* This one uses two verts of selected edge (weighted interpolation). */ | |||||
| /* Nearest point on nearest edge. */ | |||||
| MREMAP_MODE_VERT_EDGEINTERP_NEAREST = MREMAP_MODE_VERT | MREMAP_USE_EDGE | MREMAP_USE_NEAREST | | |||||
| MREMAP_USE_INTERP, | |||||
| /* Nearest vertex of nearest poly. */ | |||||
| MREMAP_MODE_VERT_POLY_NEAREST = MREMAP_MODE_VERT | MREMAP_USE_POLY | MREMAP_USE_NEAREST, | |||||
| /* Those two use all verts of selected poly (weighted interpolation). */ | |||||
| /* Nearest point on nearest poly. */ | |||||
| MREMAP_MODE_VERT_POLYINTERP_NEAREST = MREMAP_MODE_VERT | MREMAP_USE_POLY | MREMAP_USE_NEAREST | | |||||
| MREMAP_USE_INTERP, | |||||
| /* Point on nearest face hit by ray from target vertex's normal. */ | |||||
| MREMAP_MODE_VERT_POLYINTERP_VNORPROJ = MREMAP_MODE_VERT | MREMAP_USE_POLY | MREMAP_USE_NORPROJ | | |||||
| MREMAP_USE_INTERP, | |||||
| /* ***** Target's edges ***** */ | |||||
| MREMAP_MODE_EDGE = 1 << 25, | |||||
| /* Source edge which both vertices are nearest of dest ones. */ | |||||
| MREMAP_MODE_EDGE_VERT_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_VERT | MREMAP_USE_NEAREST, | |||||
| /* Nearest source edge (using mid-point). */ | |||||
| MREMAP_MODE_EDGE_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_EDGE | MREMAP_USE_NEAREST, | |||||
| /* Nearest edge of nearest poly (using mid-point). */ | |||||
| MREMAP_MODE_EDGE_POLY_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_POLY | MREMAP_USE_NEAREST, | |||||
| /* Cast a set of rays from along dest edge, | |||||
| * interpolating its vertices' normals, and use hit source edges. */ | |||||
| MREMAP_MODE_EDGE_EDGEINTERP_VNORPROJ = MREMAP_MODE_EDGE | MREMAP_USE_VERT | MREMAP_USE_NORPROJ | | |||||
| MREMAP_USE_INTERP, | |||||
| /* ***** Target's loops ***** */ | |||||
| /* Note: when islands are given to loop mapping func, | |||||
| * all loops from the same destination face will always be mapped | |||||
| * to loops of source faces within a same island, regardless of mapping mode. */ | |||||
| MREMAP_MODE_LOOP = 1 << 26, | |||||
| /* Best normal-matching loop from nearest vert. */ | |||||
| MREMAP_MODE_LOOP_NEAREST_LOOPNOR = MREMAP_MODE_LOOP | MREMAP_USE_LOOP | MREMAP_USE_VERT | | |||||
| MREMAP_USE_NEAREST | MREMAP_USE_NORMAL, | |||||
| /* Loop from best normal-matching poly from nearest vert. */ | |||||
| MREMAP_MODE_LOOP_NEAREST_POLYNOR = MREMAP_MODE_LOOP | MREMAP_USE_POLY | MREMAP_USE_VERT | | |||||
| MREMAP_USE_NEAREST | MREMAP_USE_NORMAL, | |||||
| /* Loop from nearest vertex of nearest poly. */ | |||||
| MREMAP_MODE_LOOP_POLY_NEAREST = MREMAP_MODE_LOOP | MREMAP_USE_POLY | MREMAP_USE_NEAREST, | |||||
| /* Those two use all verts of selected poly (weighted interpolation). */ | |||||
| /* Nearest point on nearest poly. */ | |||||
| MREMAP_MODE_LOOP_POLYINTERP_NEAREST = MREMAP_MODE_LOOP | MREMAP_USE_POLY | MREMAP_USE_NEAREST | | |||||
| MREMAP_USE_INTERP, | |||||
| /* Point on nearest face hit by ray from target loop's normal. */ | |||||
| MREMAP_MODE_LOOP_POLYINTERP_LNORPROJ = MREMAP_MODE_LOOP | MREMAP_USE_POLY | MREMAP_USE_NORPROJ | | |||||
| MREMAP_USE_INTERP, | |||||
| /* ***** Target's polygons ***** */ | |||||
| MREMAP_MODE_POLY = 1 << 27, | |||||
| /* Nearest source poly. */ | |||||
| MREMAP_MODE_POLY_NEAREST = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NEAREST, | |||||
| /* Source poly from best normal-matching dest poly. */ | |||||
| MREMAP_MODE_POLY_NOR = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NORMAL, | |||||
| /* Project dest poly onto source mesh using its normal, | |||||
| * and use interpolation of all intersecting source polys. */ | |||||
| MREMAP_MODE_POLY_POLYINTERP_PNORPROJ = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NORPROJ | | |||||
| MREMAP_USE_INTERP, | |||||
| /* ***** Same topology, applies to all four elements types. ***** */ | |||||
| MREMAP_MODE_TOPOLOGY = MREMAP_MODE_VERT | MREMAP_MODE_EDGE | MREMAP_MODE_LOOP | MREMAP_MODE_POLY, | |||||
| }; | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||