forked from bartvdbraak/blender
- remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
This commit is contained in:
parent
be674afdad
commit
a368e6771a
@ -41,7 +41,6 @@
|
|||||||
#include "BLI_mempool.h"
|
#include "BLI_mempool.h"
|
||||||
#include "BLI_memarena.h"
|
#include "BLI_memarena.h"
|
||||||
#include "DNA_image_types.h"
|
#include "DNA_image_types.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BKE_DerivedMesh.h"
|
#include "BKE_DerivedMesh.h"
|
||||||
//XXX #include "transform.h"
|
//XXX #include "transform.h"
|
||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
@ -250,9 +249,4 @@ void BME_free_transdata(struct BME_TransData_Head *td);
|
|||||||
float *BME_bevel_calc_polynormal(struct BME_Poly *f, struct BME_TransData_Head *td);
|
float *BME_bevel_calc_polynormal(struct BME_Poly *f, struct BME_TransData_Head *td);
|
||||||
struct BMesh *BME_bevel(struct BMEditMesh *em, float value, int res, int options, int defgrp_index, float angle, BME_TransData_Head **rtd);
|
struct BMesh *BME_bevel(struct BMEditMesh *em, float value, int res, int options, int defgrp_index, float angle, BME_TransData_Head **rtd);
|
||||||
|
|
||||||
/*CONVERSION FUNCTIONS*/
|
|
||||||
struct BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em);
|
|
||||||
void BME_bmesh_to_editmesh(struct BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em);
|
|
||||||
struct BME_Mesh *BME_derivedmesh_to_bmesh(struct DerivedMesh *dm);
|
|
||||||
struct DerivedMesh *BME_bmesh_to_derivedmesh(struct BME_Mesh *bm, struct DerivedMesh *dm);
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
struct DerivedMesh;
|
struct DerivedMesh;
|
||||||
struct BMEditMesh;
|
struct BMEditMesh;
|
||||||
struct EditMesh;
|
|
||||||
struct Mesh;
|
struct Mesh;
|
||||||
struct Object;
|
struct Object;
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ extern "C" {
|
|||||||
|
|
||||||
struct ARegion;
|
struct ARegion;
|
||||||
struct bScreen;
|
struct bScreen;
|
||||||
struct EditMesh;
|
|
||||||
struct ListBase;
|
struct ListBase;
|
||||||
struct Main;
|
struct Main;
|
||||||
struct Object;
|
struct Object;
|
||||||
|
@ -178,13 +178,9 @@ void CustomData_copy_data(const struct CustomData *source,
|
|||||||
struct CustomData *dest, int source_index,
|
struct CustomData *dest, int source_index,
|
||||||
int dest_index, int count);
|
int dest_index, int count);
|
||||||
void CustomData_copy_elements(int type, void *source, void *dest, int count);
|
void CustomData_copy_elements(int type, void *source, void *dest, int count);
|
||||||
void CustomData_em_copy_data(const struct CustomData *source,
|
|
||||||
struct CustomData *dest, void *src_block,
|
|
||||||
void **dest_block);
|
|
||||||
void CustomData_bmesh_copy_data(const struct CustomData *source,
|
void CustomData_bmesh_copy_data(const struct CustomData *source,
|
||||||
struct CustomData *dest, void *src_block,
|
struct CustomData *dest, void *src_block,
|
||||||
void **dest_block);
|
void **dest_block);
|
||||||
void CustomData_em_validate_data(struct CustomData *data, void *block, int sub_elements);
|
|
||||||
|
|
||||||
/* frees data in a CustomData object
|
/* frees data in a CustomData object
|
||||||
* return 1 on success, 0 on failure
|
* return 1 on success, 0 on failure
|
||||||
@ -208,9 +204,6 @@ void CustomData_free_elem(struct CustomData *data, int index, int count);
|
|||||||
void CustomData_interp(const struct CustomData *source, struct CustomData *dest,
|
void CustomData_interp(const struct CustomData *source, struct CustomData *dest,
|
||||||
int *src_indices, float *weights, float *sub_weights,
|
int *src_indices, float *weights, float *sub_weights,
|
||||||
int count, int dest_index);
|
int count, int dest_index);
|
||||||
void CustomData_em_interp(struct CustomData *data, void **src_blocks,
|
|
||||||
float *weights, float *sub_weights, int count,
|
|
||||||
void *dest_block);
|
|
||||||
void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks,
|
void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks,
|
||||||
float *weights, float *sub_weights, int count,
|
float *weights, float *sub_weights, int count,
|
||||||
void *dest_block);
|
void *dest_block);
|
||||||
@ -226,8 +219,6 @@ void CustomData_swap(struct CustomData *data, int index, const int *corner_indic
|
|||||||
*/
|
*/
|
||||||
void *CustomData_get(const struct CustomData *data, int index, int type);
|
void *CustomData_get(const struct CustomData *data, int index, int type);
|
||||||
void *CustomData_get_n(const struct CustomData *data, int type, int index, int n);
|
void *CustomData_get_n(const struct CustomData *data, int type, int index, int n);
|
||||||
void *CustomData_em_get(const struct CustomData *data, void *block, int type);
|
|
||||||
void *CustomData_em_get_n(const struct CustomData *data, void *block, int type, int n);
|
|
||||||
void *CustomData_bmesh_get(const struct CustomData *data, void *block, int type);
|
void *CustomData_bmesh_get(const struct CustomData *data, void *block, int type);
|
||||||
void *CustomData_bmesh_get_n(const struct CustomData *data, void *block, int type, int n);
|
void *CustomData_bmesh_get_n(const struct CustomData *data, void *block, int type, int n);
|
||||||
|
|
||||||
@ -263,10 +254,6 @@ int CustomData_get_stencil_layer(const struct CustomData *data, int type);
|
|||||||
*/
|
*/
|
||||||
void CustomData_set(const struct CustomData *data, int index, int type,
|
void CustomData_set(const struct CustomData *data, int index, int type,
|
||||||
void *source);
|
void *source);
|
||||||
void CustomData_em_set(struct CustomData *data, void *block, int type,
|
|
||||||
void *source);
|
|
||||||
void CustomData_em_set_n(struct CustomData *data, void *block, int type, int n,
|
|
||||||
void *source);
|
|
||||||
|
|
||||||
void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
|
void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
|
||||||
void *source);
|
void *source);
|
||||||
@ -300,10 +287,6 @@ void CustomData_set_layer_stencil_index(struct CustomData *data, int type, int n
|
|||||||
/* adds flag to the layer flags */
|
/* adds flag to the layer flags */
|
||||||
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag);
|
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag);
|
||||||
|
|
||||||
/* alloc/free a block of custom data attached to one element in editmode */
|
|
||||||
void CustomData_em_set_default(struct CustomData *data, void **block);
|
|
||||||
void CustomData_em_free_block(struct CustomData *data, void **block);
|
|
||||||
|
|
||||||
void CustomData_bmesh_set_default(struct CustomData *data, void **block);
|
void CustomData_bmesh_set_default(struct CustomData *data, void **block);
|
||||||
void CustomData_bmesh_free_block(struct CustomData *data, void **block);
|
void CustomData_bmesh_free_block(struct CustomData *data, void **block);
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ struct ListBase;
|
|||||||
struct Material;
|
struct Material;
|
||||||
struct Bone;
|
struct Bone;
|
||||||
struct Mesh;
|
struct Mesh;
|
||||||
struct EditMesh;
|
|
||||||
struct DerivedMesh;
|
struct DerivedMesh;
|
||||||
|
|
||||||
/* used for curves, nurbs, mball, importing */
|
/* used for curves, nurbs, mball, importing */
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include "BKE_customdata.h"
|
#include "BKE_customdata.h"
|
||||||
|
|
||||||
struct ID;
|
struct ID;
|
||||||
struct EditMesh;
|
|
||||||
struct DerivedMesh;
|
struct DerivedMesh;
|
||||||
struct DagForest;
|
struct DagForest;
|
||||||
struct DagNode;
|
struct DagNode;
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
struct DMGridAdjacency;
|
struct DMGridAdjacency;
|
||||||
struct DMGridData;
|
struct DMGridData;
|
||||||
struct DerivedMesh;
|
struct DerivedMesh;
|
||||||
struct EditMesh;
|
|
||||||
struct IndexNode;
|
struct IndexNode;
|
||||||
struct ListBase;
|
struct ListBase;
|
||||||
struct Mesh;
|
struct Mesh;
|
||||||
|
@ -37,13 +37,13 @@
|
|||||||
|
|
||||||
#include "DNA_cloth_types.h"
|
#include "DNA_cloth_types.h"
|
||||||
#include "DNA_key_types.h"
|
#include "DNA_key_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h" // N_T
|
#include "DNA_scene_types.h" // N_T
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_memarena.h"
|
#include "BLI_memarena.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
@ -761,7 +761,7 @@ static float *get_editbmesh_orco_verts(BMEditMesh *em)
|
|||||||
|
|
||||||
totvert= em->bm->totvert;
|
totvert= em->bm->totvert;
|
||||||
|
|
||||||
orco = MEM_mallocN(sizeof(float)*3*totvert, "EditMesh Orco");
|
orco = MEM_mallocN(sizeof(float)*3*totvert, "BMEditMesh Orco");
|
||||||
|
|
||||||
eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
|
eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
|
||||||
for (a=0; eve; eve=BM_iter_step(&iter), a+=3) {
|
for (a=0; eve; eve=BM_iter_step(&iter), a+=3) {
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
@ -46,6 +45,7 @@
|
|||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_group_types.h"
|
#include "DNA_group_types.h"
|
||||||
#include "DNA_key_types.h"
|
#include "DNA_key_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_vfont_types.h"
|
#include "DNA_vfont_types.h"
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_linklist.h"
|
#include "BLI_linklist.h"
|
||||||
|
|
||||||
|
@ -43,12 +43,10 @@
|
|||||||
#include "BKE_utildefines.h"
|
#include "BKE_utildefines.h"
|
||||||
#include "BKE_tessmesh.h"
|
#include "BKE_tessmesh.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_scanfill.h"
|
#include "BLI_scanfill.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_pbvh.h"
|
#include "BLI_pbvh.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
@ -61,6 +59,7 @@
|
|||||||
#include "BKE_paint.h"
|
#include "BKE_paint.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_curve_types.h" /* for Curve */
|
#include "DNA_curve_types.h" /* for Curve */
|
||||||
@ -1793,104 +1792,6 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *UNUSED(ob))
|
|||||||
return dm;
|
return dm;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DerivedMesh *UNUSED_FUNCTION(CDDM_from_editmesh)(EditMesh *em, Mesh *UNUSED(me))
|
|
||||||
{
|
|
||||||
DerivedMesh *dm = CDDM_new(BLI_countlist(&em->verts),
|
|
||||||
BLI_countlist(&em->edges),
|
|
||||||
BLI_countlist(&em->faces), 0, 0);
|
|
||||||
CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
|
|
||||||
EditVert *eve;
|
|
||||||
EditEdge *eed;
|
|
||||||
EditFace *efa;
|
|
||||||
MVert *mvert = cddm->mvert;
|
|
||||||
MEdge *medge = cddm->medge;
|
|
||||||
MFace *mface = cddm->mface;
|
|
||||||
int i, *index;
|
|
||||||
|
|
||||||
dm->deformedOnly = 1;
|
|
||||||
|
|
||||||
CustomData_merge(&em->vdata, &dm->vertData, CD_MASK_DERIVEDMESH,
|
|
||||||
CD_CALLOC, dm->numVertData);
|
|
||||||
/* CustomData_merge(&em->edata, &dm->edgeData, CD_MASK_DERIVEDMESH,
|
|
||||||
CD_CALLOC, dm->numEdgeData); */
|
|
||||||
CustomData_merge(&em->fdata, &dm->faceData, CD_MASK_DERIVEDMESH,
|
|
||||||
CD_CALLOC, dm->numTessFaceData);
|
|
||||||
CustomData_merge(&em->fdata, &dm->faceData, CD_MASK_DERIVEDMESH,
|
|
||||||
CD_CALLOC, dm->numTessFaceData);
|
|
||||||
|
|
||||||
/* set eve->hash to vert index */
|
|
||||||
for(i = 0, eve = em->verts.first; eve; eve = eve->next, ++i)
|
|
||||||
eve->tmp.l = i;
|
|
||||||
|
|
||||||
/* Need to be able to mark loose edges */
|
|
||||||
for(eed = em->edges.first; eed; eed = eed->next) {
|
|
||||||
eed->f2 = 0;
|
|
||||||
}
|
|
||||||
for(efa = em->faces.first; efa; efa = efa->next) {
|
|
||||||
efa->e1->f2 = 1;
|
|
||||||
efa->e2->f2 = 1;
|
|
||||||
efa->e3->f2 = 1;
|
|
||||||
if(efa->e4) efa->e4->f2 = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
index = dm->getVertDataArray(dm, CD_ORIGINDEX);
|
|
||||||
for(i = 0, eve = em->verts.first; i < dm->numVertData;
|
|
||||||
i++, eve = eve->next, index++) {
|
|
||||||
MVert *mv = &mvert[i];
|
|
||||||
|
|
||||||
copy_v3_v3(mv->co, eve->co);
|
|
||||||
|
|
||||||
normal_float_to_short_v3(mv->no, eve->no);
|
|
||||||
mv->bweight = (unsigned char) (eve->bweight * 255.0f);
|
|
||||||
|
|
||||||
mv->flag = 0;
|
|
||||||
|
|
||||||
*index = i;
|
|
||||||
|
|
||||||
CustomData_from_em_block(&em->vdata, &dm->vertData, eve->data, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
index = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
|
|
||||||
for(i = 0, eed = em->edges.first; i < dm->numEdgeData;
|
|
||||||
i++, eed = eed->next, index++) {
|
|
||||||
MEdge *med = &medge[i];
|
|
||||||
|
|
||||||
med->v1 = eed->v1->tmp.l;
|
|
||||||
med->v2 = eed->v2->tmp.l;
|
|
||||||
med->crease = (unsigned char) (eed->crease * 255.0f);
|
|
||||||
med->bweight = (unsigned char) (eed->bweight * 255.0f);
|
|
||||||
med->flag = ME_EDGEDRAW|ME_EDGERENDER;
|
|
||||||
|
|
||||||
if(eed->seam) med->flag |= ME_SEAM;
|
|
||||||
if(eed->sharp) med->flag |= ME_SHARP;
|
|
||||||
if(!eed->f2) med->flag |= ME_LOOSEEDGE;
|
|
||||||
|
|
||||||
*index = i;
|
|
||||||
|
|
||||||
/* CustomData_from_em_block(&em->edata, &dm->edgeData, eed->data, i); */
|
|
||||||
}
|
|
||||||
|
|
||||||
index = dm->getTessFaceDataArray(dm, CD_POLYINDEX);
|
|
||||||
for(i = 0, efa = em->faces.first; i < dm->numTessFaceData;
|
|
||||||
i++, efa = efa->next, index++) {
|
|
||||||
MFace *mf = &mface[i];
|
|
||||||
|
|
||||||
mf->v1 = efa->v1->tmp.l;
|
|
||||||
mf->v2 = efa->v2->tmp.l;
|
|
||||||
mf->v3 = efa->v3->tmp.l;
|
|
||||||
mf->v4 = efa->v4 ? efa->v4->tmp.l : 0;
|
|
||||||
mf->mat_nr = efa->mat_nr;
|
|
||||||
mf->flag = efa->flag;
|
|
||||||
|
|
||||||
*index = i;
|
|
||||||
|
|
||||||
CustomData_from_em_block(&em->fdata, &dm->faceData, efa->data, i);
|
|
||||||
test_index_face(mf, &dm->faceData, i, efa->v4?4:3);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dm;
|
|
||||||
}
|
|
||||||
|
|
||||||
DerivedMesh *CDDM_from_curve(Object *ob)
|
DerivedMesh *CDDM_from_curve(Object *ob)
|
||||||
{
|
{
|
||||||
return CDDM_from_curve_customDB(ob, &ob->disp);
|
return CDDM_from_curve_customDB(ob, &ob->disp);
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_kdopbvh.h"
|
#include "BLI_kdopbvh.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -2154,287 +2154,6 @@ void CustomData_set(const CustomData *data, int index, int type, void *source)
|
|||||||
memcpy(dest, source, typeInfo->size);
|
memcpy(dest, source, typeInfo->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EditMesh functions */
|
|
||||||
|
|
||||||
void CustomData_em_free_block(CustomData *data, void **block)
|
|
||||||
{
|
|
||||||
const LayerTypeInfo *typeInfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if(!*block) return;
|
|
||||||
|
|
||||||
for(i = 0; i < data->totlayer; ++i) {
|
|
||||||
if(!(data->layers[i].flag & CD_FLAG_NOFREE)) {
|
|
||||||
typeInfo = layerType_getInfo(data->layers[i].type);
|
|
||||||
|
|
||||||
if(typeInfo->free) {
|
|
||||||
int offset = data->layers[i].offset;
|
|
||||||
typeInfo->free((char*)*block + offset, 1, typeInfo->size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MEM_freeN(*block);
|
|
||||||
*block = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void CustomData_em_alloc_block(CustomData *data, void **block)
|
|
||||||
{
|
|
||||||
/* TODO: optimize free/alloc */
|
|
||||||
|
|
||||||
if (*block)
|
|
||||||
CustomData_em_free_block(data, block);
|
|
||||||
|
|
||||||
if (data->totsize > 0)
|
|
||||||
*block = MEM_callocN(data->totsize, "CustomData EM block");
|
|
||||||
else
|
|
||||||
*block = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_em_copy_data(const CustomData *source, CustomData *dest,
|
|
||||||
void *src_block, void **dest_block)
|
|
||||||
{
|
|
||||||
const LayerTypeInfo *typeInfo;
|
|
||||||
int dest_i, src_i;
|
|
||||||
|
|
||||||
if (!*dest_block)
|
|
||||||
CustomData_em_alloc_block(dest, dest_block);
|
|
||||||
|
|
||||||
/* copies a layer at a time */
|
|
||||||
dest_i = 0;
|
|
||||||
for(src_i = 0; src_i < source->totlayer; ++src_i) {
|
|
||||||
|
|
||||||
/* find the first dest layer with type >= the source type
|
|
||||||
* (this should work because layers are ordered by type)
|
|
||||||
*/
|
|
||||||
while(dest_i < dest->totlayer
|
|
||||||
&& dest->layers[dest_i].type < source->layers[src_i].type)
|
|
||||||
++dest_i;
|
|
||||||
|
|
||||||
/* if there are no more dest layers, we're done */
|
|
||||||
if(dest_i >= dest->totlayer) return;
|
|
||||||
|
|
||||||
/* if we found a matching layer, copy the data */
|
|
||||||
if(dest->layers[dest_i].type == source->layers[src_i].type &&
|
|
||||||
strcmp(dest->layers[dest_i].name, source->layers[src_i].name) == 0) {
|
|
||||||
char *src_data = (char*)src_block + source->layers[src_i].offset;
|
|
||||||
char *dest_data = (char*)*dest_block + dest->layers[dest_i].offset;
|
|
||||||
|
|
||||||
typeInfo = layerType_getInfo(source->layers[src_i].type);
|
|
||||||
|
|
||||||
if(typeInfo->copy)
|
|
||||||
typeInfo->copy(src_data, dest_data, 1);
|
|
||||||
else
|
|
||||||
memcpy(dest_data, src_data, typeInfo->size);
|
|
||||||
|
|
||||||
/* if there are multiple source & dest layers of the same type,
|
|
||||||
* we don't want to copy all source layers to the same dest, so
|
|
||||||
* increment dest_i
|
|
||||||
*/
|
|
||||||
++dest_i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_em_validate_data(CustomData *data, void *block, int sub_elements)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for(i = 0; i < data->totlayer; i++) {
|
|
||||||
const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[i].type);
|
|
||||||
char *leayer_data = (char*)block + data->layers[i].offset;
|
|
||||||
|
|
||||||
if(typeInfo->validate)
|
|
||||||
typeInfo->validate(leayer_data, sub_elements);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void *CustomData_em_get(const CustomData *data, void *block, int type)
|
|
||||||
{
|
|
||||||
int layer_index;
|
|
||||||
|
|
||||||
/* get the layer index of the first layer of type */
|
|
||||||
layer_index = CustomData_get_active_layer_index(data, type);
|
|
||||||
if(layer_index < 0) return NULL;
|
|
||||||
|
|
||||||
return (char *)block + data->layers[layer_index].offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *CustomData_em_get_n(const CustomData *data, void *block, int type, int n)
|
|
||||||
{
|
|
||||||
int layer_index;
|
|
||||||
|
|
||||||
/* get the layer index of the first layer of type */
|
|
||||||
layer_index = CustomData_get_layer_index_n(data, type, n);
|
|
||||||
if(layer_index < 0) return NULL;
|
|
||||||
|
|
||||||
return (char *)block + data->layers[layer_index].offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_em_set(CustomData *data, void *block, int type, void *source)
|
|
||||||
{
|
|
||||||
void *dest = CustomData_em_get(data, block, type);
|
|
||||||
const LayerTypeInfo *typeInfo = layerType_getInfo(type);
|
|
||||||
|
|
||||||
if(!dest) return;
|
|
||||||
|
|
||||||
if(typeInfo->copy)
|
|
||||||
typeInfo->copy(source, dest, 1);
|
|
||||||
else
|
|
||||||
memcpy(dest, source, typeInfo->size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_em_set_n(CustomData *data, void *block, int type, int n, void *source)
|
|
||||||
{
|
|
||||||
void *dest = CustomData_em_get_n(data, block, type, n);
|
|
||||||
const LayerTypeInfo *typeInfo = layerType_getInfo(type);
|
|
||||||
|
|
||||||
if(!dest) return;
|
|
||||||
|
|
||||||
if(typeInfo->copy)
|
|
||||||
typeInfo->copy(source, dest, 1);
|
|
||||||
else
|
|
||||||
memcpy(dest, source, typeInfo->size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_em_interp(CustomData *data, void **src_blocks, float *weights,
|
|
||||||
float *sub_weights, int count, void *dest_block)
|
|
||||||
{
|
|
||||||
int i, j;
|
|
||||||
void *source_buf[SOURCE_BUF_SIZE];
|
|
||||||
void **sources = source_buf;
|
|
||||||
|
|
||||||
/* slow fallback in case we're interpolating a ridiculous number of
|
|
||||||
* elements
|
|
||||||
*/
|
|
||||||
if(count > SOURCE_BUF_SIZE)
|
|
||||||
sources = MEM_callocN(sizeof(*sources) * count,
|
|
||||||
"CustomData_interp sources");
|
|
||||||
|
|
||||||
/* interpolates a layer at a time */
|
|
||||||
for(i = 0; i < data->totlayer; ++i) {
|
|
||||||
CustomDataLayer *layer = &data->layers[i];
|
|
||||||
const LayerTypeInfo *typeInfo = layerType_getInfo(layer->type);
|
|
||||||
|
|
||||||
if(typeInfo->interp) {
|
|
||||||
for(j = 0; j < count; ++j)
|
|
||||||
sources[j] = (char *)src_blocks[j] + layer->offset;
|
|
||||||
|
|
||||||
typeInfo->interp(sources, weights, sub_weights, count,
|
|
||||||
(char *)dest_block + layer->offset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count > SOURCE_BUF_SIZE) MEM_freeN(sources);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_em_set_default(CustomData *data, void **block)
|
|
||||||
{
|
|
||||||
const LayerTypeInfo *typeInfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!*block)
|
|
||||||
CustomData_em_alloc_block(data, block);
|
|
||||||
|
|
||||||
for(i = 0; i < data->totlayer; ++i) {
|
|
||||||
int offset = data->layers[i].offset;
|
|
||||||
|
|
||||||
typeInfo = layerType_getInfo(data->layers[i].type);
|
|
||||||
|
|
||||||
if(typeInfo->set_default)
|
|
||||||
typeInfo->set_default((char*)*block + offset, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_to_em_block(const CustomData *source, CustomData *dest,
|
|
||||||
int src_index, void **dest_block)
|
|
||||||
{
|
|
||||||
const LayerTypeInfo *typeInfo;
|
|
||||||
int dest_i, src_i, src_offset;
|
|
||||||
|
|
||||||
if (!*dest_block)
|
|
||||||
CustomData_em_alloc_block(dest, dest_block);
|
|
||||||
|
|
||||||
/* copies a layer at a time */
|
|
||||||
dest_i = 0;
|
|
||||||
for(src_i = 0; src_i < source->totlayer; ++src_i) {
|
|
||||||
|
|
||||||
/* find the first dest layer with type >= the source type
|
|
||||||
* (this should work because layers are ordered by type)
|
|
||||||
*/
|
|
||||||
while(dest_i < dest->totlayer
|
|
||||||
&& dest->layers[dest_i].type < source->layers[src_i].type)
|
|
||||||
++dest_i;
|
|
||||||
|
|
||||||
/* if there are no more dest layers, we're done */
|
|
||||||
if(dest_i >= dest->totlayer) return;
|
|
||||||
|
|
||||||
/* if we found a matching layer, copy the data */
|
|
||||||
if(dest->layers[dest_i].type == source->layers[src_i].type) {
|
|
||||||
int offset = dest->layers[dest_i].offset;
|
|
||||||
char *src_data = source->layers[src_i].data;
|
|
||||||
char *dest_data = (char*)*dest_block + offset;
|
|
||||||
|
|
||||||
typeInfo = layerType_getInfo(dest->layers[dest_i].type);
|
|
||||||
src_offset = src_index * typeInfo->size;
|
|
||||||
|
|
||||||
if(typeInfo->copy)
|
|
||||||
typeInfo->copy(src_data + src_offset, dest_data, 1);
|
|
||||||
else
|
|
||||||
memcpy(dest_data, src_data + src_offset, typeInfo->size);
|
|
||||||
|
|
||||||
/* if there are multiple source & dest layers of the same type,
|
|
||||||
* we don't want to copy all source layers to the same dest, so
|
|
||||||
* increment dest_i
|
|
||||||
*/
|
|
||||||
++dest_i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomData_from_em_block(const CustomData *source, CustomData *dest,
|
|
||||||
void *src_block, int dest_index)
|
|
||||||
{
|
|
||||||
const LayerTypeInfo *typeInfo;
|
|
||||||
int dest_i, src_i, dest_offset;
|
|
||||||
|
|
||||||
/* copies a layer at a time */
|
|
||||||
dest_i = 0;
|
|
||||||
for(src_i = 0; src_i < source->totlayer; ++src_i) {
|
|
||||||
|
|
||||||
/* find the first dest layer with type >= the source type
|
|
||||||
* (this should work because layers are ordered by type)
|
|
||||||
*/
|
|
||||||
while(dest_i < dest->totlayer
|
|
||||||
&& dest->layers[dest_i].type < source->layers[src_i].type)
|
|
||||||
++dest_i;
|
|
||||||
|
|
||||||
/* if there are no more dest layers, we're done */
|
|
||||||
if(dest_i >= dest->totlayer) return;
|
|
||||||
|
|
||||||
/* if we found a matching layer, copy the data */
|
|
||||||
if(dest->layers[dest_i].type == source->layers[src_i].type) {
|
|
||||||
int offset = source->layers[src_i].offset;
|
|
||||||
char *src_data = (char*)src_block + offset;
|
|
||||||
char *dest_data = dest->layers[dest_i].data;
|
|
||||||
|
|
||||||
typeInfo = layerType_getInfo(dest->layers[dest_i].type);
|
|
||||||
dest_offset = dest_index * typeInfo->size;
|
|
||||||
|
|
||||||
if(typeInfo->copy)
|
|
||||||
typeInfo->copy(src_data, dest_data + dest_offset, 1);
|
|
||||||
else
|
|
||||||
memcpy(dest_data + dest_offset, src_data, typeInfo->size);
|
|
||||||
|
|
||||||
/* if there are multiple source & dest layers of the same type,
|
|
||||||
* we don't want to copy all source layers to the same dest, so
|
|
||||||
* increment dest_i
|
|
||||||
*/
|
|
||||||
++dest_i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Bmesh functions*/
|
/*Bmesh functions*/
|
||||||
/*needed to convert to/from different face reps*/
|
/*needed to convert to/from different face reps*/
|
||||||
void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata,
|
void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata,
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_scanfill.h"
|
#include "BLI_scanfill.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
@ -417,8 +416,8 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, i
|
|||||||
|
|
||||||
void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
|
void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
|
||||||
{
|
{
|
||||||
EditVert *eve, *v1, *vlast;
|
ScanFillVert *eve, *v1, *vlast;
|
||||||
EditFace *efa;
|
ScanFillFace *efa;
|
||||||
DispList *dlnew=NULL, *dl;
|
DispList *dlnew=NULL, *dl;
|
||||||
float *f1;
|
float *f1;
|
||||||
int colnr=0, charidx=0, cont=1, tot, a, *index, nextcol= 0;
|
int colnr=0, charidx=0, cont=1, tot, a, *index, nextcol= 0;
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_pbvh.h"
|
#include "BLI_pbvh.h"
|
||||||
|
|
||||||
@ -191,9 +190,9 @@ static void BMEdit_RecalcTesselation_intern(BMEditMesh *tm)
|
|||||||
#endif /* USE_TESSFACE_SPEEDUP */
|
#endif /* USE_TESSFACE_SPEEDUP */
|
||||||
|
|
||||||
else {
|
else {
|
||||||
EditVert *v, *lastv=NULL, *firstv=NULL;
|
ScanFillVert *v, *lastv=NULL, *firstv=NULL;
|
||||||
EditEdge *e;
|
ScanFillEdge *e;
|
||||||
EditFace *efa;
|
ScanFillFace *efa;
|
||||||
int totfilltri;
|
int totfilltri;
|
||||||
|
|
||||||
BLI_begin_edgefill();
|
BLI_begin_edgefill();
|
||||||
|
@ -37,13 +37,13 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math_vector.h"
|
#include "BLI_math_vector.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "DNA_anim_types.h"
|
#include "DNA_anim_types.h"
|
||||||
#include "DNA_key_types.h"
|
#include "DNA_key_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_key_types.h"
|
#include "DNA_key_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_ipo_types.h"
|
#include "DNA_ipo_types.h"
|
||||||
#include "DNA_customdata_types.h"
|
#include "DNA_customdata_types.h"
|
||||||
@ -46,7 +47,6 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_bpath.h"
|
#include "BLI_bpath.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_scanfill.h"
|
#include "BLI_scanfill.h"
|
||||||
@ -71,7 +71,6 @@
|
|||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
@ -461,7 +460,7 @@ Mesh *add_mesh(const char *name)
|
|||||||
|
|
||||||
me->size[0]= me->size[1]= me->size[2]= 1.0;
|
me->size[0]= me->size[1]= me->size[2]= 1.0;
|
||||||
me->smoothresh= 30;
|
me->smoothresh= 30;
|
||||||
me->texflag= AUTOSPACE;
|
me->texflag= ME_AUTOSPACE;
|
||||||
me->flag= ME_TWOSIDED;
|
me->flag= ME_TWOSIDED;
|
||||||
me->bb= unit_boundbox();
|
me->bb= unit_boundbox();
|
||||||
me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
|
me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
|
||||||
@ -658,7 +657,7 @@ void tex_space_mesh(Mesh *me)
|
|||||||
|
|
||||||
boundbox_mesh(me, loc, size);
|
boundbox_mesh(me, loc, size);
|
||||||
|
|
||||||
if(me->texflag & AUTOSPACE) {
|
if (me->texflag & ME_AUTOSPACE) {
|
||||||
for (a=0; a<3; a++) {
|
for (a=0; a<3; a++) {
|
||||||
if(size[a]==0.0f) size[a]= 1.0f;
|
if(size[a]==0.0f) size[a]= 1.0f;
|
||||||
else if(size[a]>0.0f && size[a]<0.00001f) size[a]= 0.00001f;
|
else if(size[a]>0.0f && size[a]<0.00001f) size[a]= 0.00001f;
|
||||||
@ -2252,8 +2251,8 @@ int mesh_recalcTesselation(CustomData *fdata,
|
|||||||
MLoop *ml, *mloop;
|
MLoop *ml, *mloop;
|
||||||
MFace *mface = NULL, *mf;
|
MFace *mface = NULL, *mf;
|
||||||
BLI_array_declare(mface);
|
BLI_array_declare(mface);
|
||||||
EditVert *v, *lastv, *firstv;
|
ScanFillVert *v, *lastv, *firstv;
|
||||||
EditFace *f;
|
ScanFillFace *f;
|
||||||
int *mface_orig_index = NULL;
|
int *mface_orig_index = NULL;
|
||||||
BLI_array_declare(mface_orig_index);
|
BLI_array_declare(mface_orig_index);
|
||||||
int *mface_to_poly_map = NULL;
|
int *mface_to_poly_map = NULL;
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_pbvh.h"
|
#include "BLI_pbvh.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_cdderivedmesh.h"
|
#include "BKE_cdderivedmesh.h"
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_movieclip_types.h"
|
#include "DNA_movieclip_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -58,7 +59,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_bpath.h"
|
#include "BLI_bpath.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_pbvh.h"
|
#include "BLI_pbvh.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "DNA_mesh_types.h"
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -42,17 +42,46 @@ extern struct ListBase fillvertbase;
|
|||||||
extern struct ListBase filledgebase;
|
extern struct ListBase filledgebase;
|
||||||
extern struct ListBase fillfacebase;
|
extern struct ListBase fillfacebase;
|
||||||
|
|
||||||
struct EditVert;
|
struct ScanFillVert;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* scanfill.c: used in displist only... */
|
/* note; changing this also might affect the undo copy in editmesh.c */
|
||||||
struct EditVert *BLI_addfillvert(float *vec);
|
typedef struct ScanFillVert
|
||||||
struct EditEdge *BLI_addfilledge(struct EditVert *v1, struct EditVert *v2);
|
{
|
||||||
|
struct ScanFillVert *next, *prev;
|
||||||
|
union {
|
||||||
|
struct ScanFillVert *v;
|
||||||
|
void *p;
|
||||||
|
intptr_t l;
|
||||||
|
} tmp;
|
||||||
|
float co[3]; /*vertex location */
|
||||||
|
int keyindex; /* original index #, for restoring key information */
|
||||||
|
short poly_nr;
|
||||||
|
unsigned char f, h;
|
||||||
|
} ScanFillVert;
|
||||||
|
|
||||||
/* Optionally set EditEdge f to this to mark original boundary edges.
|
typedef struct ScanFillEdge
|
||||||
|
{
|
||||||
|
struct ScanFillEdge *next, *prev;
|
||||||
|
struct ScanFillVert *v1, *v2;
|
||||||
|
short poly_nr;
|
||||||
|
unsigned char f;
|
||||||
|
} ScanFillEdge;
|
||||||
|
|
||||||
|
typedef struct ScanFillFace
|
||||||
|
{
|
||||||
|
struct ScanFillFace *next, *prev;
|
||||||
|
struct ScanFillVert *v1, *v2, *v3;
|
||||||
|
} ScanFillFace;
|
||||||
|
|
||||||
|
/* scanfill.c: used in displist only... */
|
||||||
|
struct ScanFillVert *BLI_addfillvert(const float vec[3]);
|
||||||
|
struct ScanFillEdge *BLI_addfilledge(struct ScanFillVert *v1, struct ScanFillVert *v2);
|
||||||
|
|
||||||
|
/* Optionally set ScanFillEdge f to this to mark original boundary edges.
|
||||||
Only needed if there are internal diagonal edges pased to BLI_edgefill. */
|
Only needed if there are internal diagonal edges pased to BLI_edgefill. */
|
||||||
#define FILLBOUNDARY 1
|
#define FILLBOUNDARY 1
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ set(SRC
|
|||||||
BLI_dynlib.h
|
BLI_dynlib.h
|
||||||
BLI_dynstr.h
|
BLI_dynstr.h
|
||||||
BLI_edgehash.h
|
BLI_edgehash.h
|
||||||
BLI_editVert.h
|
|
||||||
BLI_fileops.h
|
BLI_fileops.h
|
||||||
BLI_fileops_types.h
|
BLI_fileops_types.h
|
||||||
BLI_fnmatch.h
|
BLI_fnmatch.h
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_callbacks.h"
|
#include "BLI_callbacks.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_scanfill.h"
|
#include "BLI_scanfill.h"
|
||||||
@ -86,17 +85,17 @@ typedef struct PolyFill {
|
|||||||
short f,nr;
|
short f,nr;
|
||||||
} PolyFill;
|
} PolyFill;
|
||||||
|
|
||||||
typedef struct ScFillVert {
|
typedef struct ScanFillVertLink {
|
||||||
EditVert *v1;
|
ScanFillVert *v1;
|
||||||
EditEdge *first,*last;
|
ScanFillEdge *first, *last;
|
||||||
} ScFillVert;
|
} ScanFillVertLink;
|
||||||
|
|
||||||
|
|
||||||
/* local funcs */
|
/* local funcs */
|
||||||
|
|
||||||
#define COMPLIMIT 0.00003
|
#define COMPLIMIT 0.00003
|
||||||
|
|
||||||
static ScFillVert *scdata;
|
static ScanFillVertLink *scdata;
|
||||||
|
|
||||||
ListBase fillvertbase = {NULL, NULL};
|
ListBase fillvertbase = {NULL, NULL};
|
||||||
ListBase filledgebase = {NULL, NULL};
|
ListBase filledgebase = {NULL, NULL};
|
||||||
@ -109,7 +108,7 @@ static int cox, coy;
|
|||||||
|
|
||||||
static int vergscdata(const void *a1, const void *a2)
|
static int vergscdata(const void *a1, const void *a2)
|
||||||
{
|
{
|
||||||
const ScFillVert *x1=a1,*x2=a2;
|
const ScanFillVertLink *x1=a1,*x2=a2;
|
||||||
|
|
||||||
if( x1->v1->co[coy] < x2->v1->co[coy] ) return 1;
|
if( x1->v1->co[coy] < x2->v1->co[coy] ) return 1;
|
||||||
else if( x1->v1->co[coy] > x2->v1->co[coy]) return -1;
|
else if( x1->v1->co[coy] > x2->v1->co[coy]) return -1;
|
||||||
@ -205,11 +204,11 @@ void BLI_end_edgefill(void)
|
|||||||
|
|
||||||
/* **** FILL ROUTINES *************************** */
|
/* **** FILL ROUTINES *************************** */
|
||||||
|
|
||||||
EditVert *BLI_addfillvert(float *vec)
|
ScanFillVert *BLI_addfillvert(const float vec[3])
|
||||||
{
|
{
|
||||||
EditVert *eve;
|
ScanFillVert *eve;
|
||||||
|
|
||||||
eve= mem_element_new(sizeof(EditVert));
|
eve= mem_element_new(sizeof(ScanFillVert));
|
||||||
BLI_addtail(&fillvertbase, eve);
|
BLI_addtail(&fillvertbase, eve);
|
||||||
|
|
||||||
eve->co[0] = vec[0];
|
eve->co[0] = vec[0];
|
||||||
@ -219,11 +218,11 @@ EditVert *BLI_addfillvert(float *vec)
|
|||||||
return eve;
|
return eve;
|
||||||
}
|
}
|
||||||
|
|
||||||
EditEdge *BLI_addfilledge(EditVert *v1, EditVert *v2)
|
ScanFillEdge *BLI_addfilledge(ScanFillVert *v1, ScanFillVert *v2)
|
||||||
{
|
{
|
||||||
EditEdge *newed;
|
ScanFillEdge *newed;
|
||||||
|
|
||||||
newed= mem_element_new(sizeof(EditEdge));
|
newed= mem_element_new(sizeof(ScanFillEdge));
|
||||||
BLI_addtail(&filledgebase, newed);
|
BLI_addtail(&filledgebase, newed);
|
||||||
|
|
||||||
newed->v1= v1;
|
newed->v1= v1;
|
||||||
@ -232,19 +231,17 @@ EditEdge *BLI_addfilledge(EditVert *v1, EditVert *v2)
|
|||||||
return newed;
|
return newed;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addfillface(EditVert *v1, EditVert *v2, EditVert *v3, short mat_nr)
|
static void addfillface(ScanFillVert *v1, ScanFillVert *v2, ScanFillVert *v3)
|
||||||
{
|
{
|
||||||
/* does not make edges */
|
/* does not make edges */
|
||||||
EditFace *evl;
|
ScanFillFace *evl;
|
||||||
|
|
||||||
evl= mem_element_new(sizeof(EditFace));
|
evl= mem_element_new(sizeof(ScanFillFace));
|
||||||
BLI_addtail(&fillfacebase, evl);
|
BLI_addtail(&fillfacebase, evl);
|
||||||
|
|
||||||
evl->v1= v1;
|
evl->v1= v1;
|
||||||
evl->v2= v2;
|
evl->v2= v2;
|
||||||
evl->v3= v3;
|
evl->v3= v3;
|
||||||
evl->f= 2;
|
|
||||||
evl->mat_nr= mat_nr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int boundisect(PolyFill *pf2, PolyFill *pf1)
|
static int boundisect(PolyFill *pf2, PolyFill *pf1)
|
||||||
@ -273,18 +270,18 @@ static int boundisect(PolyFill *pf2, PolyFill *pf1)
|
|||||||
|
|
||||||
static void mergepolysSimp(PolyFill *pf1, PolyFill *pf2) /* add pf2 to pf1 */
|
static void mergepolysSimp(PolyFill *pf1, PolyFill *pf2) /* add pf2 to pf1 */
|
||||||
{
|
{
|
||||||
EditVert *eve;
|
ScanFillVert *eve;
|
||||||
EditEdge *eed;
|
ScanFillEdge *eed;
|
||||||
|
|
||||||
/* replace old poly numbers */
|
/* replace old poly numbers */
|
||||||
eve= fillvertbase.first;
|
eve= fillvertbase.first;
|
||||||
while(eve) {
|
while(eve) {
|
||||||
if(eve->xs== pf2->nr) eve->xs= pf1->nr;
|
if(eve->poly_nr == pf2->nr) eve->poly_nr = pf1->nr;
|
||||||
eve= eve->next;
|
eve= eve->next;
|
||||||
}
|
}
|
||||||
eed= filledgebase.first;
|
eed= filledgebase.first;
|
||||||
while(eed) {
|
while(eed) {
|
||||||
if(eed->f1== pf2->nr) eed->f1= pf1->nr;
|
if (eed->poly_nr == pf2->nr) eed->poly_nr = pf1->nr;
|
||||||
eed= eed->next;
|
eed= eed->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,10 +307,10 @@ static short testedgeside(float *v1, float *v2, float *v3)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static short addedgetoscanvert(ScFillVert *sc, EditEdge *eed)
|
static short addedgetoscanvert(ScanFillVertLink *sc, ScanFillEdge *eed)
|
||||||
{
|
{
|
||||||
/* find first edge to the right of eed, and insert eed before that */
|
/* find first edge to the right of eed, and insert eed before that */
|
||||||
EditEdge *ed;
|
ScanFillEdge *ed;
|
||||||
float fac,fac1,x,y;
|
float fac,fac1,x,y;
|
||||||
|
|
||||||
if(sc->first==0) {
|
if(sc->first==0) {
|
||||||
@ -354,12 +351,12 @@ static short addedgetoscanvert(ScFillVert *sc, EditEdge *eed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static ScFillVert *addedgetoscanlist(EditEdge *eed, int len)
|
static ScanFillVertLink *addedgetoscanlist(ScanFillEdge *eed, int len)
|
||||||
{
|
{
|
||||||
/* inserts edge at correct location in ScFillVert list */
|
/* inserts edge at correct location in ScanFillVertLink list */
|
||||||
/* returns sc when edge already exists */
|
/* returns sc when edge already exists */
|
||||||
ScFillVert *sc,scsearch;
|
ScanFillVertLink *sc,scsearch;
|
||||||
EditVert *eve;
|
ScanFillVert *eve;
|
||||||
|
|
||||||
/* which vert is left-top? */
|
/* which vert is left-top? */
|
||||||
if(eed->v1->co[coy] == eed->v2->co[coy]) {
|
if(eed->v1->co[coy] == eed->v2->co[coy]) {
|
||||||
@ -376,8 +373,8 @@ static ScFillVert *addedgetoscanlist(EditEdge *eed, int len)
|
|||||||
}
|
}
|
||||||
/* find location in list */
|
/* find location in list */
|
||||||
scsearch.v1= eed->v1;
|
scsearch.v1= eed->v1;
|
||||||
sc= (ScFillVert *)bsearch(&scsearch,scdata,len,
|
sc= (ScanFillVertLink *)bsearch(&scsearch,scdata,len,
|
||||||
sizeof(ScFillVert), vergscdata);
|
sizeof(ScanFillVertLink), vergscdata);
|
||||||
|
|
||||||
if(sc==0) printf("Error in search edge: %p\n", (void *)eed);
|
if(sc==0) printf("Error in search edge: %p\n", (void *)eed);
|
||||||
else if(addedgetoscanvert(sc,eed)==0) return sc;
|
else if(addedgetoscanvert(sc,eed)==0) return sc;
|
||||||
@ -385,7 +382,7 @@ static ScFillVert *addedgetoscanlist(EditEdge *eed, int len)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static short boundinsideEV(EditEdge *eed, EditVert *eve)
|
static short boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve)
|
||||||
/* is eve inside boundbox eed */
|
/* is eve inside boundbox eed */
|
||||||
{
|
{
|
||||||
float minx,maxx,miny,maxy;
|
float minx,maxx,miny,maxy;
|
||||||
@ -416,8 +413,8 @@ static void testvertexnearedge(void)
|
|||||||
/* only vertices with ->h==1 are being tested for
|
/* only vertices with ->h==1 are being tested for
|
||||||
being close to an edge, if true insert */
|
being close to an edge, if true insert */
|
||||||
|
|
||||||
EditVert *eve;
|
ScanFillVert *eve;
|
||||||
EditEdge *eed,*ed1;
|
ScanFillEdge *eed,*ed1;
|
||||||
float dist,vec1[2],vec2[2],vec3[2];
|
float dist,vec1[2],vec2[2],vec3[2];
|
||||||
|
|
||||||
eve= fillvertbase.first;
|
eve= fillvertbase.first;
|
||||||
@ -437,7 +434,7 @@ static void testvertexnearedge(void)
|
|||||||
}
|
}
|
||||||
eed= filledgebase.first;
|
eed= filledgebase.first;
|
||||||
while(eed) {
|
while(eed) {
|
||||||
if(eve!=eed->v1 && eve!=eed->v2 && eve->xs==eed->f1) {
|
if (eve != eed->v1 && eve != eed->v2 && eve->poly_nr == eed->poly_nr) {
|
||||||
if(compare_v3v3(eve->co,eed->v1->co, COMPLIMIT)) {
|
if(compare_v3v3(eve->co,eed->v1->co, COMPLIMIT)) {
|
||||||
ed1->v2= eed->v1;
|
ed1->v2= eed->v1;
|
||||||
eed->v1->h++;
|
eed->v1->h++;
|
||||||
@ -462,8 +459,8 @@ static void testvertexnearedge(void)
|
|||||||
ed1= BLI_addfilledge(eed->v1, eve);
|
ed1= BLI_addfilledge(eed->v1, eve);
|
||||||
|
|
||||||
/* printf("fill: vertex near edge %x\n",eve); */
|
/* printf("fill: vertex near edge %x\n",eve); */
|
||||||
ed1->f= ed1->h= 0;
|
ed1->f= 0;
|
||||||
ed1->f1= eed->f1;
|
ed1->poly_nr = eed->poly_nr;
|
||||||
eed->v1= eve;
|
eed->v1= eve;
|
||||||
eve->h= 3;
|
eve->h= 3;
|
||||||
break;
|
break;
|
||||||
@ -481,8 +478,8 @@ static void testvertexnearedge(void)
|
|||||||
static void splitlist(ListBase *tempve, ListBase *temped, short nr)
|
static void splitlist(ListBase *tempve, ListBase *temped, short nr)
|
||||||
{
|
{
|
||||||
/* everything is in templist, write only poly nr to fillist */
|
/* everything is in templist, write only poly nr to fillist */
|
||||||
EditVert *eve,*nextve;
|
ScanFillVert *eve,*nextve;
|
||||||
EditEdge *eed,*nexted;
|
ScanFillEdge *eed,*nexted;
|
||||||
|
|
||||||
BLI_movelisttolist(tempve,&fillvertbase);
|
BLI_movelisttolist(tempve,&fillvertbase);
|
||||||
BLI_movelisttolist(temped,&filledgebase);
|
BLI_movelisttolist(temped,&filledgebase);
|
||||||
@ -490,7 +487,7 @@ static void splitlist(ListBase *tempve, ListBase *temped, short nr)
|
|||||||
eve= tempve->first;
|
eve= tempve->first;
|
||||||
while(eve) {
|
while(eve) {
|
||||||
nextve= eve->next;
|
nextve= eve->next;
|
||||||
if(eve->xs==nr) {
|
if (eve->poly_nr == nr) {
|
||||||
BLI_remlink(tempve,eve);
|
BLI_remlink(tempve,eve);
|
||||||
BLI_addtail(&fillvertbase,eve);
|
BLI_addtail(&fillvertbase,eve);
|
||||||
}
|
}
|
||||||
@ -499,7 +496,7 @@ static void splitlist(ListBase *tempve, ListBase *temped, short nr)
|
|||||||
eed= temped->first;
|
eed= temped->first;
|
||||||
while(eed) {
|
while(eed) {
|
||||||
nexted= eed->next;
|
nexted= eed->next;
|
||||||
if(eed->f1==nr) {
|
if(eed->poly_nr==nr) {
|
||||||
BLI_remlink(temped,eed);
|
BLI_remlink(temped,eed);
|
||||||
BLI_addtail(&filledgebase,eed);
|
BLI_addtail(&filledgebase,eed);
|
||||||
}
|
}
|
||||||
@ -508,11 +505,11 @@ static void splitlist(ListBase *tempve, ListBase *temped, short nr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int scanfill(PolyFill *pf, short mat_nr)
|
static int scanfill(PolyFill *pf)
|
||||||
{
|
{
|
||||||
ScFillVert *sc = NULL, *sc1;
|
ScanFillVertLink *sc = NULL, *sc1;
|
||||||
EditVert *eve,*v1,*v2,*v3;
|
ScanFillVert *eve,*v1,*v2,*v3;
|
||||||
EditEdge *eed,*nexted,*ed1,*ed2,*ed3;
|
ScanFillEdge *eed,*nexted,*ed1,*ed2,*ed3;
|
||||||
float miny = 0.0;
|
float miny = 0.0;
|
||||||
int a,b,verts, maxface, totface;
|
int a,b,verts, maxface, totface;
|
||||||
short nr, test, twoconnected=0;
|
short nr, test, twoconnected=0;
|
||||||
@ -558,14 +555,14 @@ static int scanfill(PolyFill *pf, short mat_nr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* STEP 1: make using FillVert and FillEdge lists a sorted
|
/* STEP 1: make using FillVert and FillEdge lists a sorted
|
||||||
ScFillVert list
|
ScanFillVertLink list
|
||||||
*/
|
*/
|
||||||
sc= scdata= (ScFillVert *)MEM_callocN(pf->verts*sizeof(ScFillVert),"Scanfill1");
|
sc= scdata= (ScanFillVertLink *)MEM_callocN(pf->verts*sizeof(ScanFillVertLink),"Scanfill1");
|
||||||
eve= fillvertbase.first;
|
eve= fillvertbase.first;
|
||||||
verts= 0;
|
verts= 0;
|
||||||
while(eve) {
|
while(eve) {
|
||||||
if(eve->xs==nr) {
|
if (eve->poly_nr == nr) {
|
||||||
if(eve->f!= 255) {
|
if (eve->f != 255) {
|
||||||
verts++;
|
verts++;
|
||||||
eve->f= 0; /* flag for connectedges later on */
|
eve->f= 0; /* flag for connectedges later on */
|
||||||
sc->v1= eve;
|
sc->v1= eve;
|
||||||
@ -575,7 +572,7 @@ static int scanfill(PolyFill *pf, short mat_nr)
|
|||||||
eve= eve->next;
|
eve= eve->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
qsort(scdata, verts, sizeof(ScFillVert), vergscdata);
|
qsort(scdata, verts, sizeof(ScanFillVertLink), vergscdata);
|
||||||
|
|
||||||
eed= filledgebase.first;
|
eed= filledgebase.first;
|
||||||
while(eed) {
|
while(eed) {
|
||||||
@ -698,7 +695,7 @@ static int scanfill(PolyFill *pf, short mat_nr)
|
|||||||
else {
|
else {
|
||||||
/* new triangle */
|
/* new triangle */
|
||||||
/* printf("add face %x %x %x\n",v1,v2,v3); */
|
/* printf("add face %x %x %x\n",v1,v2,v3); */
|
||||||
addfillface(v1, v2, v3, mat_nr);
|
addfillface(v1, v2, v3);
|
||||||
totface++;
|
totface++;
|
||||||
BLI_remlink((ListBase *)&(sc->first),ed1);
|
BLI_remlink((ListBase *)&(sc->first),ed1);
|
||||||
BLI_addtail(&filledgebase,ed1);
|
BLI_addtail(&filledgebase,ed1);
|
||||||
@ -787,8 +784,8 @@ int BLI_edgefill(short mat_nr)
|
|||||||
- returns number of triangle faces added.
|
- returns number of triangle faces added.
|
||||||
*/
|
*/
|
||||||
ListBase tempve, temped;
|
ListBase tempve, temped;
|
||||||
EditVert *eve;
|
ScanFillVert *eve;
|
||||||
EditEdge *eed,*nexted;
|
ScanFillEdge *eed,*nexted;
|
||||||
PolyFill *pflist,*pf;
|
PolyFill *pflist,*pf;
|
||||||
float limit, *minp, *maxp, *v1, *v2, norm[3], len;
|
float limit, *minp, *maxp, *v1, *v2, norm[3], len;
|
||||||
short a,c,poly=0,ok=0,toggle=0;
|
short a,c,poly=0,ok=0,toggle=0;
|
||||||
@ -799,7 +796,7 @@ int BLI_edgefill(short mat_nr)
|
|||||||
a = 0;
|
a = 0;
|
||||||
while(eve) {
|
while(eve) {
|
||||||
eve->f= 0;
|
eve->f= 0;
|
||||||
eve->xs= 0;
|
eve->poly_nr= 0;
|
||||||
eve->h= 0;
|
eve->h= 0;
|
||||||
eve= eve->next;
|
eve= eve->next;
|
||||||
a += 1;
|
a += 1;
|
||||||
@ -808,7 +805,7 @@ int BLI_edgefill(short mat_nr)
|
|||||||
if (a == 3 && (mat_nr & 2)) {
|
if (a == 3 && (mat_nr & 2)) {
|
||||||
eve = fillvertbase.first;
|
eve = fillvertbase.first;
|
||||||
|
|
||||||
addfillface(eve, eve->next, eve->next->next, 0);
|
addfillface(eve, eve->next, eve->next->next);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (a == 4 && (mat_nr & 2)) {
|
} else if (a == 4 && (mat_nr & 2)) {
|
||||||
float vec1[3], vec2[3];
|
float vec1[3], vec2[3];
|
||||||
@ -821,15 +818,15 @@ int BLI_edgefill(short mat_nr)
|
|||||||
sub_v3_v3v3(vec2, eve->next->co, eve->next->next->next->co);
|
sub_v3_v3v3(vec2, eve->next->co, eve->next->next->next->co);
|
||||||
|
|
||||||
if (INPR(vec1, vec1) < INPR(vec2, vec2)) {
|
if (INPR(vec1, vec1) < INPR(vec2, vec2)) {
|
||||||
addfillface(eve, eve->next, eve->next->next, 0);
|
addfillface(eve, eve->next, eve->next->next);
|
||||||
addfillface(eve->next->next, eve->next->next->next, eve, 0);
|
addfillface(eve->next->next, eve->next->next->next, eve);
|
||||||
} else{
|
} else{
|
||||||
addfillface(eve->next, eve->next->next, eve->next->next->next, 0);
|
addfillface(eve->next, eve->next->next, eve->next->next->next);
|
||||||
addfillface(eve->next->next->next, eve, eve->next, 0);
|
addfillface(eve->next->next->next, eve, eve->next);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
addfillface(eve, eve->next, eve->next->next, 0);
|
addfillface(eve, eve->next, eve->next->next);
|
||||||
addfillface(eve->next->next, eve->next->next->next, eve, 0);
|
addfillface(eve->next->next, eve->next->next->next, eve);
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -838,7 +835,7 @@ int BLI_edgefill(short mat_nr)
|
|||||||
/* including resetting of flags */
|
/* including resetting of flags */
|
||||||
eed= filledgebase.first;
|
eed= filledgebase.first;
|
||||||
while(eed) {
|
while(eed) {
|
||||||
eed->f1= eed->h= 0;
|
eed->poly_nr= 0;
|
||||||
eed->v1->f= 1;
|
eed->v1->f= 1;
|
||||||
eed->v2->f= 1;
|
eed->v2->f= 1;
|
||||||
|
|
||||||
@ -895,11 +892,11 @@ int BLI_edgefill(short mat_nr)
|
|||||||
eve= fillvertbase.first;
|
eve= fillvertbase.first;
|
||||||
while(eve) {
|
while(eve) {
|
||||||
/* get first vertex with no poly number */
|
/* get first vertex with no poly number */
|
||||||
if(eve->xs==0) {
|
if (eve->poly_nr==0) {
|
||||||
poly++;
|
poly++;
|
||||||
/* now a sortof select connected */
|
/* now a sortof select connected */
|
||||||
ok= 1;
|
ok= 1;
|
||||||
eve->xs= poly;
|
eve->poly_nr = poly;
|
||||||
|
|
||||||
while(ok) {
|
while(ok) {
|
||||||
|
|
||||||
@ -909,19 +906,19 @@ int BLI_edgefill(short mat_nr)
|
|||||||
else eed= filledgebase.last;
|
else eed= filledgebase.last;
|
||||||
|
|
||||||
while(eed) {
|
while(eed) {
|
||||||
if(eed->v1->xs==0 && eed->v2->xs==poly) {
|
if (eed->v1->poly_nr == 0 && eed->v2->poly_nr == poly) {
|
||||||
eed->v1->xs= poly;
|
eed->v1->poly_nr = poly;
|
||||||
eed->f1= poly;
|
eed->poly_nr= poly;
|
||||||
ok= 1;
|
ok= 1;
|
||||||
}
|
}
|
||||||
else if(eed->v2->xs==0 && eed->v1->xs==poly) {
|
else if (eed->v2->poly_nr == 0 && eed->v1->poly_nr == poly) {
|
||||||
eed->v2->xs= poly;
|
eed->v2->poly_nr = poly;
|
||||||
eed->f1= poly;
|
eed->poly_nr= poly;
|
||||||
ok= 1;
|
ok= 1;
|
||||||
}
|
}
|
||||||
else if(eed->f1==0) {
|
else if (eed->poly_nr == 0) {
|
||||||
if(eed->v1->xs==poly && eed->v2->xs==poly) {
|
if (eed->v1->poly_nr == poly && eed->v2->poly_nr == poly) {
|
||||||
eed->f1= poly;
|
eed->poly_nr= poly;
|
||||||
ok= 1;
|
ok= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1002,21 +999,21 @@ int BLI_edgefill(short mat_nr)
|
|||||||
}
|
}
|
||||||
eed= filledgebase.first;
|
eed= filledgebase.first;
|
||||||
while(eed) {
|
while(eed) {
|
||||||
pflist[eed->f1-1].edges++;
|
pflist[eed->poly_nr-1].edges++;
|
||||||
eed= eed->next;
|
eed= eed->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
eve= fillvertbase.first;
|
eve= fillvertbase.first;
|
||||||
while(eve) {
|
while(eve) {
|
||||||
pflist[eve->xs-1].verts++;
|
pflist[eve->poly_nr-1].verts++;
|
||||||
minp= pflist[eve->xs-1].min;
|
minp= pflist[eve->poly_nr-1].min;
|
||||||
maxp= pflist[eve->xs-1].max;
|
maxp= pflist[eve->poly_nr-1].max;
|
||||||
|
|
||||||
minp[cox]= (minp[cox])<(eve->co[cox]) ? (minp[cox]) : (eve->co[cox]);
|
minp[cox]= (minp[cox])<(eve->co[cox]) ? (minp[cox]) : (eve->co[cox]);
|
||||||
minp[coy]= (minp[coy])<(eve->co[coy]) ? (minp[coy]) : (eve->co[coy]);
|
minp[coy]= (minp[coy])<(eve->co[coy]) ? (minp[coy]) : (eve->co[coy]);
|
||||||
maxp[cox]= (maxp[cox])>(eve->co[cox]) ? (maxp[cox]) : (eve->co[cox]);
|
maxp[cox]= (maxp[cox])>(eve->co[cox]) ? (maxp[cox]) : (eve->co[cox]);
|
||||||
maxp[coy]= (maxp[coy])>(eve->co[coy]) ? (maxp[coy]) : (eve->co[coy]);
|
maxp[coy]= (maxp[coy])>(eve->co[coy]) ? (maxp[coy]) : (eve->co[coy]);
|
||||||
if(eve->h>2) pflist[eve->xs-1].f= 1;
|
if(eve->h > 2) pflist[eve->poly_nr-1].f = 1;
|
||||||
|
|
||||||
eve= eve->next;
|
eve= eve->next;
|
||||||
}
|
}
|
||||||
@ -1083,7 +1080,7 @@ int BLI_edgefill(short mat_nr)
|
|||||||
for(a=0;a<poly;a++) {
|
for(a=0;a<poly;a++) {
|
||||||
if(pf->edges>1) {
|
if(pf->edges>1) {
|
||||||
splitlist(&tempve,&temped,pf->nr);
|
splitlist(&tempve,&temped,pf->nr);
|
||||||
totfaces += scanfill(pf, mat_nr);
|
totfaces += scanfill(pf);
|
||||||
}
|
}
|
||||||
pf++;
|
pf++;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "BLI_scanfill.h"
|
#include "BLI_scanfill.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_smallhash.h"
|
#include "BLI_smallhash.h"
|
||||||
|
|
||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
@ -159,9 +158,9 @@ void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op)
|
|||||||
BMOIter siter;
|
BMOIter siter;
|
||||||
BMEdge *e;
|
BMEdge *e;
|
||||||
BMOperator bmop;
|
BMOperator bmop;
|
||||||
EditEdge *eed;
|
ScanFillEdge *eed;
|
||||||
EditVert *eve, *v1, *v2;
|
ScanFillVert *eve, *v1, *v2;
|
||||||
EditFace *efa;
|
ScanFillFace *efa;
|
||||||
SmallHash hash;
|
SmallHash hash;
|
||||||
|
|
||||||
BLI_smallhash_init(&hash);
|
BLI_smallhash_init(&hash);
|
||||||
@ -186,7 +185,7 @@ void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op)
|
|||||||
v1 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v1);
|
v1 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v1);
|
||||||
v2 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v2);
|
v2 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v2);
|
||||||
eed = BLI_addfilledge(v1, v2);
|
eed = BLI_addfilledge(v1, v2);
|
||||||
eed->tmp.p = e;
|
/* eed->tmp.p = e; */ /* UNUSED */
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_edgefill(0);
|
BLI_edgefill(0);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "DNA_anim_types.h"
|
#include "DNA_anim_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_constraint_types.h"
|
#include "DNA_constraint_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
@ -48,7 +49,6 @@
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
|
|
||||||
#include "BKE_animsys.h"
|
#include "BKE_animsys.h"
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_graph.h"
|
#include "BLI_graph.h"
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef RIGID_DEFORM
|
#ifdef RIGID_DEFORM
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_polardecomp.h"
|
#include "BLI_polardecomp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
|
@ -38,11 +38,11 @@
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "IMB_imbuf_types.h"
|
#include "IMB_imbuf_types.h"
|
||||||
#include "IMB_imbuf.h"
|
#include "IMB_imbuf.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
@ -54,9 +54,9 @@
|
|||||||
#include "WM_types.h"
|
#include "WM_types.h"
|
||||||
|
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "BKE_tessmesh.h"
|
#include "BKE_tessmesh.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "mesh_intern.h"
|
#include "mesh_intern.h"
|
||||||
|
|
||||||
@ -1802,8 +1802,8 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
|||||||
|
|
||||||
for (i = 0; i < totface; i++) {
|
for (i = 0; i < totface; i++) {
|
||||||
SmallHash *hash = &shash;
|
SmallHash *hash = &shash;
|
||||||
EditFace *efa;
|
ScanFillFace *efa;
|
||||||
EditVert *eve, *lasteve;
|
ScanFillVert *eve, *lasteve;
|
||||||
int j;
|
int j;
|
||||||
float rndscale = FLT_EPSILON * 25;
|
float rndscale = FLT_EPSILON * 25;
|
||||||
|
|
||||||
@ -1818,7 +1818,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
|||||||
for (entry = face_nets[i].first; entry; entry = entry->next) {
|
for (entry = face_nets[i].first; entry; entry = entry->next) {
|
||||||
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v1)) {
|
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v1)) {
|
||||||
eve = BLI_addfillvert(entry->kfe->v1->v->co);
|
eve = BLI_addfillvert(entry->kfe->v1->v->co);
|
||||||
eve->xs = 0;
|
eve->poly_nr = 0;
|
||||||
rnd_offset_co(eve->co, rndscale);
|
rnd_offset_co(eve->co, rndscale);
|
||||||
eve->tmp.p = entry->kfe->v1->v;
|
eve->tmp.p = entry->kfe->v1->v;
|
||||||
BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v1, eve);
|
BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v1, eve);
|
||||||
@ -1826,7 +1826,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
|||||||
|
|
||||||
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v2)) {
|
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v2)) {
|
||||||
eve = BLI_addfillvert(entry->kfe->v2->v->co);
|
eve = BLI_addfillvert(entry->kfe->v2->v->co);
|
||||||
eve->xs = 0;
|
eve->poly_nr = 0;
|
||||||
rnd_offset_co(eve->co, rndscale);
|
rnd_offset_co(eve->co, rndscale);
|
||||||
eve->tmp.p = entry->kfe->v2->v;
|
eve->tmp.p = entry->kfe->v2->v;
|
||||||
BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v2, eve);
|
BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v2, eve);
|
||||||
@ -1837,16 +1837,16 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
|||||||
lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
|
lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
|
||||||
eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
|
eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
|
||||||
|
|
||||||
eve->xs++;
|
eve->poly_nr++;
|
||||||
lasteve->xs++;
|
lasteve->poly_nr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0, entry = face_nets[i].first; entry; entry = entry->next, j++) {
|
for (j = 0, entry = face_nets[i].first; entry; entry = entry->next, j++) {
|
||||||
lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
|
lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
|
||||||
eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
|
eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
|
||||||
|
|
||||||
if (eve->xs > 1 && lasteve->xs > 1) {
|
if (eve->poly_nr > 1 && lasteve->poly_nr > 1) {
|
||||||
EditEdge *eed;
|
ScanFillEdge *eed;
|
||||||
eed = BLI_addfilledge(lasteve, eve);
|
eed = BLI_addfilledge(lasteve, eve);
|
||||||
if (entry->kfe->oe)
|
if (entry->kfe->oe)
|
||||||
eed->f = FILLBOUNDARY; /* mark as original boundary edge */
|
eed->f = FILLBOUNDARY; /* mark as original boundary edge */
|
||||||
@ -1855,9 +1855,9 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
|||||||
BMO_elem_flag_disable(bm, entry->kfe->e->v2, DEL);
|
BMO_elem_flag_disable(bm, entry->kfe->e->v2, DEL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (lasteve->xs < 2)
|
if (lasteve->poly_nr < 2)
|
||||||
BLI_remlink(&fillvertbase, lasteve);
|
BLI_remlink(&fillvertbase, lasteve);
|
||||||
if (eve->xs < 2)
|
if (eve->poly_nr < 2)
|
||||||
BLI_remlink(&fillvertbase, eve);
|
BLI_remlink(&fillvertbase, eve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include "DNA_ID.h"
|
#include "DNA_ID.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_screen_types.h"
|
#include "DNA_screen_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_userdef_types.h"
|
#include "DNA_userdef_types.h"
|
||||||
@ -50,7 +51,6 @@
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_dynstr.h" /*for WM_operator_pystring */
|
#include "BLI_dynstr.h" /*for WM_operator_pystring */
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_blender.h"
|
#include "BKE_blender.h"
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -44,7 +45,6 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -90,31 +90,6 @@ float labda_PdistVL2Dfl(const float v1[3], const float v2[3], const float v3[3])
|
|||||||
|
|
||||||
/* ******************** editface.c */
|
/* ******************** editface.c */
|
||||||
|
|
||||||
#if 0 /* REMOVE AFTER BMESH MERGE */
|
|
||||||
|
|
||||||
/* ******************* editmesh.c */
|
|
||||||
|
|
||||||
extern void free_editvert(EditMesh *em, EditVert *eve);
|
|
||||||
extern void free_editedge(EditMesh *em, EditEdge *eed);
|
|
||||||
extern void free_editface(EditMesh *em, EditFace *efa);
|
|
||||||
|
|
||||||
/*frees dst mesh, then copies the contents of
|
|
||||||
*src (the struct) to dst. */
|
|
||||||
void set_editMesh(EditMesh *dst, EditMesh *src);
|
|
||||||
|
|
||||||
extern void free_vertlist(EditMesh *em, ListBase *edve);
|
|
||||||
extern void free_edgelist(EditMesh *em, ListBase *lb);
|
|
||||||
extern void free_facelist(EditMesh *em, ListBase *lb);
|
|
||||||
|
|
||||||
extern void remedge(EditMesh *em, EditEdge *eed);
|
|
||||||
|
|
||||||
extern struct EditVert *addvertlist(EditMesh *em, float *vec, struct EditVert *example);
|
|
||||||
extern struct EditEdge *addedgelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2, struct EditEdge *example);
|
|
||||||
extern struct EditFace *addfacelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2, struct EditVert *v3, struct EditVert *v4, struct EditFace *example, struct EditFace *exampleEdges);
|
|
||||||
extern struct EditEdge *findedgelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc);
|
void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc);
|
||||||
|
|
||||||
void MESH_OT_separate(struct wmOperatorType *ot);
|
void MESH_OT_separate(struct wmOperatorType *ot);
|
||||||
@ -137,58 +112,6 @@ void MESH_OT_duplicate(struct wmOperatorType *ot);
|
|||||||
void MESH_OT_fgon_make(struct wmOperatorType *ot);
|
void MESH_OT_fgon_make(struct wmOperatorType *ot);
|
||||||
void MESH_OT_fgon_clear(struct wmOperatorType *ot);
|
void MESH_OT_fgon_clear(struct wmOperatorType *ot);
|
||||||
|
|
||||||
#if 0 /* REMOVE AFTER BMESH MERGE */
|
|
||||||
|
|
||||||
/* ******************* editmesh_lib.c */
|
|
||||||
void EM_stats_update(EditMesh *em);
|
|
||||||
|
|
||||||
extern void EM_fgon_flags(EditMesh *em);
|
|
||||||
extern void EM_hide_reset(EditMesh *em);
|
|
||||||
|
|
||||||
extern int faceselectedOR(EditFace *efa, int flag);
|
|
||||||
extern int faceselectedAND(EditFace *efa, int flag);
|
|
||||||
|
|
||||||
void EM_remove_selection(EditMesh *em, void *data, int type);
|
|
||||||
void EM_clear_flag_all(EditMesh *em, int flag);
|
|
||||||
void EM_set_flag_all(EditMesh *em, int flag);
|
|
||||||
void EM_set_flag_all_selectmode(EditMesh *em, int flag);
|
|
||||||
|
|
||||||
void EM_data_interp_from_verts(EditMesh *em, EditVert *v1, EditVert *v2, EditVert *eve, float fac);
|
|
||||||
void EM_data_interp_from_faces(EditMesh *em, EditFace *efa1, EditFace *efa2, EditFace *efan, int i1, int i2, int i3, int i4);
|
|
||||||
|
|
||||||
int EM_nvertices_selected(EditMesh *em);
|
|
||||||
int EM_nedges_selected(EditMesh *em);
|
|
||||||
int EM_nfaces_selected(EditMesh *em);
|
|
||||||
|
|
||||||
float EM_face_perimeter(EditFace *efa);
|
|
||||||
|
|
||||||
void EM_store_selection(EditMesh *em, void *data, int type);
|
|
||||||
|
|
||||||
extern EditFace *exist_face(EditMesh *em, EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4);
|
|
||||||
extern void flipface(EditMesh *em, EditFace *efa); // flips for normal direction
|
|
||||||
extern int compareface(EditFace *vl1, EditFace *vl2);
|
|
||||||
|
|
||||||
/* flag for selection bits, *nor will be filled with normal for extrusion constraint */
|
|
||||||
/* return value defines if such normal was set */
|
|
||||||
extern short extrudeflag_face_indiv(EditMesh *em, short flag, float *nor);
|
|
||||||
extern short extrudeflag_verts_indiv(EditMesh *em, short flag, float *nor);
|
|
||||||
extern short extrudeflag_edges_indiv(EditMesh *em, short flag, float *nor);
|
|
||||||
extern short extrudeflag_vert(Object *obedit, EditMesh *em, short flag, float *nor, int all);
|
|
||||||
extern short extrudeflag(Object *obedit, EditMesh *em, short flag, float *nor, int all);
|
|
||||||
|
|
||||||
extern void adduplicateflag(EditMesh *em, int flag);
|
|
||||||
extern void delfaceflag(EditMesh *em, int flag);
|
|
||||||
|
|
||||||
extern void rotateflag(EditMesh *em, short flag, float *cent, float rotmat[][3]);
|
|
||||||
extern void translateflag(EditMesh *em, short flag, float *vec);
|
|
||||||
|
|
||||||
extern int convex(float *v1, float *v2, float *v3, float *v4);
|
|
||||||
|
|
||||||
extern struct EditFace *EM_face_from_faces(EditMesh *em, struct EditFace *efa1,
|
|
||||||
struct EditFace *efa2, int i1, int i2, int i3, int i4);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int EM_view3d_poll(struct bContext *C);
|
extern int EM_view3d_poll(struct bContext *C);
|
||||||
|
|
||||||
struct wmKeyMap* knifetool_modal_keymap(struct wmKeyConfig *keyconf);
|
struct wmKeyMap* knifetool_modal_keymap(struct wmKeyConfig *keyconf);
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
#include "BKE_report.h"
|
#include "BKE_report.h"
|
||||||
#include "BKE_tessmesh.h"
|
#include "BKE_tessmesh.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_math_vector.h"
|
#include "BLI_math_vector.h"
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_key_types.h"
|
#include "DNA_key_types.h"
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
@ -50,7 +51,6 @@
|
|||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_rand.h" /* for randome face sorting */
|
#include "BLI_rand.h" /* for randome face sorting */
|
||||||
#include "BLI_threads.h"
|
#include "BLI_threads.h"
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
|
|
||||||
@ -56,6 +55,7 @@
|
|||||||
#include "DNA_object_force.h"
|
#include "DNA_object_force.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_vfont_types.h"
|
#include "DNA_vfont_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
|
|
||||||
#include "IMB_imbuf_types.h"
|
#include "IMB_imbuf_types.h"
|
||||||
|
|
||||||
|
@ -34,13 +34,13 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_string.h"
|
#include "BLI_string.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_string.h"
|
#include "BLI_string.h"
|
||||||
#include "BLI_path_util.h"
|
#include "BLI_path_util.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_animsys.h"
|
#include "BKE_animsys.h"
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "DNA_anim_types.h"
|
#include "DNA_anim_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_constraint_types.h"
|
#include "DNA_constraint_types.h"
|
||||||
#include "DNA_group_types.h"
|
#include "DNA_group_types.h"
|
||||||
#include "DNA_lamp_types.h"
|
#include "DNA_lamp_types.h"
|
||||||
@ -48,7 +49,6 @@
|
|||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_string.h"
|
#include "BLI_string.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
@ -34,13 +34,13 @@
|
|||||||
#include "DNA_anim_types.h"
|
#include "DNA_anim_types.h"
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_key_types.h"
|
#include "DNA_key_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_group_types.h"
|
#include "DNA_group_types.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -207,13 +207,13 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
|
|||||||
if (use_vert_sel) {
|
if (use_vert_sel) {
|
||||||
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
|
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
|
||||||
(*dvert_arr)[i] = BM_elem_flag_test(eve, BM_ELEM_SELECT) ?
|
(*dvert_arr)[i] = BM_elem_flag_test(eve, BM_ELEM_SELECT) ?
|
||||||
CustomData_em_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT) : NULL;
|
CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT) : NULL;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
|
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
|
||||||
(*dvert_arr)[i] = CustomData_em_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
|
(*dvert_arr)[i] = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_dlrbTree.h"
|
#include "BLI_dlrbTree.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_jitter.h"
|
#include "BLI_jitter.h"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_lamp_types.h"
|
#include "DNA_lamp_types.h"
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
@ -43,7 +44,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_animsys.h"
|
#include "BKE_animsys.h"
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_dlrbTree.h"
|
#include "BLI_dlrbTree.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
@ -44,6 +43,7 @@
|
|||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_userdef_types.h"
|
#include "DNA_userdef_types.h"
|
||||||
|
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
#include "BLI_memarena.h"
|
#include "BLI_memarena.h"
|
||||||
#include "BLI_threads.h"
|
#include "BLI_threads.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "PIL_time.h"
|
#include "PIL_time.h"
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@
|
|||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_pbvh.h"
|
#include "BLI_pbvh.h"
|
||||||
#include "BLI_threads.h"
|
#include "BLI_threads.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
@ -34,13 +34,13 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
|
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_brush_types.h"
|
#include "DNA_brush_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
|
|
||||||
#include "BKE_brush.h"
|
#include "BKE_brush.h"
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
|
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -40,7 +41,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_group_types.h"
|
#include "DNA_group_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
@ -53,7 +54,6 @@
|
|||||||
#include "ED_armature.h"
|
#include "ED_armature.h"
|
||||||
#include "ED_mesh.h"
|
#include "ED_mesh.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
typedef struct SceneStats {
|
typedef struct SceneStats {
|
||||||
int totvert, totvertsel;
|
int totvert, totvertsel;
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
|
|
||||||
#include "BLF_translation.h"
|
#include "BLF_translation.h"
|
||||||
|
@ -36,10 +36,10 @@
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "DNA_lamp_types.h"
|
#include "DNA_lamp_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -50,7 +51,6 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -46,7 +47,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
|
|
||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
|
|
||||||
@ -42,7 +43,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BLF_translation.h"
|
#include "BLF_translation.h"
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -48,7 +49,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_linklist.h"
|
#include "BLI_linklist.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
@ -38,13 +38,13 @@
|
|||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_linklist.h"
|
#include "BLI_linklist.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include "DNA_anim_types.h"
|
#include "DNA_anim_types.h"
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_constraint_types.h"
|
#include "DNA_constraint_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_movieclip_types.h"
|
#include "DNA_movieclip_types.h"
|
||||||
#include "DNA_scene_types.h" /* PET modes */
|
#include "DNA_scene_types.h" /* PET modes */
|
||||||
@ -81,7 +82,6 @@
|
|||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_linklist.h"
|
#include "BLI_linklist.h"
|
||||||
#include "BLI_smallhash.h"
|
#include "BLI_smallhash.h"
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
#include "DNA_listBase.h"
|
#include "DNA_listBase.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_smallhash.h"
|
#include "BLI_smallhash.h"
|
||||||
#include "BKE_tessmesh.h"
|
#include "BKE_tessmesh.h"
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "DNA_anim_types.h"
|
#include "DNA_anim_types.h"
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
#include "DNA_screen_types.h"
|
#include "DNA_screen_types.h"
|
||||||
@ -103,7 +104,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_smallhash.h"
|
#include "BLI_smallhash.h"
|
||||||
@ -290,7 +290,7 @@ static void createTransTexspace(TransInfo *t)
|
|||||||
|
|
||||||
if (give_obdata_texspace(ob, &texflag, &td->loc, &td->ext->size, &td->ext->rot)) {
|
if (give_obdata_texspace(ob, &texflag, &td->loc, &td->ext->size, &td->ext->rot)) {
|
||||||
ob->dtx |= OB_TEXSPACE;
|
ob->dtx |= OB_TEXSPACE;
|
||||||
*texflag &= ~AUTOSPACE;
|
*texflag &= ~ME_AUTOSPACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_v3_v3(td->iloc, td->loc);
|
copy_v3_v3(td->iloc, td->loc);
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "DNA_space_types.h"
|
#include "DNA_space_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_view3d_types.h"
|
#include "DNA_view3d_types.h"
|
||||||
#include "DNA_modifier_types.h"
|
#include "DNA_modifier_types.h"
|
||||||
@ -92,7 +93,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
#include "DNA_lattice_types.h"
|
#include "DNA_lattice_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meta_types.h"
|
#include "DNA_meta_types.h"
|
||||||
#include "DNA_screen_types.h"
|
#include "DNA_screen_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -63,7 +64,6 @@
|
|||||||
#include "BKE_tessmesh.h"
|
#include "BKE_tessmesh.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BIF_gl.h"
|
#include "BIF_gl.h"
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_curve_types.h"
|
#include "DNA_curve_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_screen_types.h"
|
#include "DNA_screen_types.h"
|
||||||
@ -46,7 +47,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BLF_translation.h"
|
#include "BLF_translation.h"
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h" // Temporary, for snapping to other unselected meshes
|
#include "DNA_meshdata_types.h" // Temporary, for snapping to other unselected meshes
|
||||||
#include "DNA_space_types.h"
|
#include "DNA_space_types.h"
|
||||||
#include "DNA_screen_types.h"
|
#include "DNA_screen_types.h"
|
||||||
@ -49,7 +50,6 @@
|
|||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_modifier_types.h"
|
#include "DNA_modifier_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
|
|
||||||
#include "BKE_DerivedMesh.h"
|
#include "BKE_DerivedMesh.h"
|
||||||
@ -45,7 +46,6 @@
|
|||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "ED_util.h"
|
#include "ED_util.h"
|
||||||
|
|
||||||
|
@ -35,12 +35,12 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
#include "DNA_packedFile_types.h"
|
#include "DNA_packedFile_types.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
#include "BKE_global.h"
|
#include "BKE_global.h"
|
||||||
|
@ -37,10 +37,10 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_dynstr.h"
|
#include "BLI_dynstr.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -40,7 +41,6 @@
|
|||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "DNA_space_types.h"
|
#include "DNA_space_types.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_DerivedMesh.h"
|
#include "BKE_DerivedMesh.h"
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_material_types.h"
|
#include "DNA_material_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
#include "DNA_image_types.h"
|
#include "DNA_image_types.h"
|
||||||
@ -47,7 +48,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
|
@ -37,10 +37,10 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_math_vector.h"
|
#include "BLI_math_vector.h"
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "DNA_camera_types.h"
|
#include "DNA_camera_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_meshdata_types.h"
|
#include "DNA_meshdata_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
@ -45,7 +46,6 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_uvproject.h"
|
#include "BLI_uvproject.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_rand.h"
|
#include "BLI_rand.h"
|
||||||
@ -64,7 +64,6 @@
|
|||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_edgehash.h"
|
#include "BLI_edgehash.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_scanfill.h"
|
#include "BLI_scanfill.h"
|
||||||
#include "BLI_array.h"
|
#include "BLI_array.h"
|
||||||
#include "BLI_uvproject.h"
|
#include "BLI_uvproject.h"
|
||||||
@ -213,8 +212,8 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
|||||||
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
|
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
|
||||||
|
|
||||||
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
|
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
|
||||||
EditVert *v, *lastv, *firstv;
|
ScanFillVert *v, *lastv, *firstv;
|
||||||
EditFace *sefa;
|
ScanFillFace *sefa;
|
||||||
ParamKey key, vkeys[4];
|
ParamKey key, vkeys[4];
|
||||||
ParamBool pin[4], select[4];
|
ParamBool pin[4], select[4];
|
||||||
BMLoop *ls[3];
|
BMLoop *ls[3];
|
||||||
@ -226,7 +225,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
|||||||
if((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) || (sel && BM_elem_flag_test(efa, BM_ELEM_SELECT)==0))
|
if((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) || (sel && BM_elem_flag_test(efa, BM_ELEM_SELECT)==0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* tf= (MTexPoly *)CustomData_em_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
|
/* tf= (MTexPoly *)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
|
||||||
lsel = 0;
|
lsel = 0;
|
||||||
|
|
||||||
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
|
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
|
||||||
@ -414,7 +413,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
|
|||||||
numOfEdges = derivedMesh->getNumEdges(derivedMesh);
|
numOfEdges = derivedMesh->getNumEdges(derivedMesh);
|
||||||
numOfFaces = derivedMesh->getNumTessFaces(derivedMesh);
|
numOfFaces = derivedMesh->getNumTessFaces(derivedMesh);
|
||||||
|
|
||||||
faceMap = MEM_mallocN(numOfFaces*sizeof(EditFace *), "unwrap_edit_face_map");
|
faceMap = MEM_mallocN(numOfFaces*sizeof(BMFace *), "unwrap_edit_face_map");
|
||||||
|
|
||||||
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
|
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
|
||||||
EDBM_init_index_arrays(em, 0, 1, 1);
|
EDBM_init_index_arrays(em, 0, 1, 1);
|
||||||
@ -423,7 +422,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
|
|||||||
for(i = 0; i < numOfFaces; i++)
|
for(i = 0; i < numOfFaces; i++)
|
||||||
faceMap[i] = EDBM_get_face_for_index(em, origFaceIndices[i]);
|
faceMap[i] = EDBM_get_face_for_index(em, origFaceIndices[i]);
|
||||||
|
|
||||||
edgeMap = MEM_mallocN(numOfEdges*sizeof(EditEdge *), "unwrap_edit_edge_map");
|
edgeMap = MEM_mallocN(numOfEdges*sizeof(BMEdge *), "unwrap_edit_edge_map");
|
||||||
|
|
||||||
/* map subsurfed edges to original editEdges */
|
/* map subsurfed edges to original editEdges */
|
||||||
for(i = 0; i < numOfEdges; i++) {
|
for(i = 0; i < numOfEdges; i++) {
|
||||||
|
@ -143,7 +143,7 @@ typedef struct TFace {
|
|||||||
/* **************** MESH ********************* */
|
/* **************** MESH ********************* */
|
||||||
|
|
||||||
/* texflag */
|
/* texflag */
|
||||||
#define AUTOSPACE 1
|
#define ME_AUTOSPACE 1
|
||||||
|
|
||||||
/* me->editflag */
|
/* me->editflag */
|
||||||
#define ME_EDIT_MIRROR_X (1 << 0)
|
#define ME_EDIT_MIRROR_X (1 << 0)
|
||||||
|
@ -54,7 +54,6 @@
|
|||||||
|
|
||||||
#include "DNA_scene_types.h"
|
#include "DNA_scene_types.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
|
|
||||||
#include "BKE_customdata.h"
|
#include "BKE_customdata.h"
|
||||||
@ -447,7 +446,7 @@ static void rna_MeshLoopColor_color_set(PointerRNA *ptr, const float *values)
|
|||||||
static int rna_Mesh_texspace_editable(PointerRNA *ptr)
|
static int rna_Mesh_texspace_editable(PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
Mesh *me= (Mesh*)ptr->data;
|
Mesh *me= (Mesh*)ptr->data;
|
||||||
return (me->texflag & AUTOSPACE)? 0: PROP_EDITABLE;
|
return (me->texflag & ME_AUTOSPACE)? 0: PROP_EDITABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_MeshVertex_groups_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
static void rna_MeshVertex_groups_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
||||||
@ -1932,7 +1931,7 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
|
|||||||
|
|
||||||
/* texture space */
|
/* texture space */
|
||||||
prop= RNA_def_property(srna, "auto_texspace", PROP_BOOLEAN, PROP_NONE);
|
prop= RNA_def_property(srna, "auto_texspace", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "texflag", AUTOSPACE);
|
RNA_def_property_boolean_sdna(prop, NULL, "texflag", ME_AUTOSPACE);
|
||||||
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object");
|
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
|
prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
|
||||||
@ -2511,7 +2510,7 @@ static void rna_def_mesh(BlenderRNA *brna)
|
|||||||
|
|
||||||
/* texture space */
|
/* texture space */
|
||||||
prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
|
prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "texflag", AUTOSPACE);
|
RNA_def_property_boolean_sdna(prop, NULL, "texflag", ME_AUTOSPACE);
|
||||||
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object");
|
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object");
|
||||||
|
|
||||||
/*prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
|
/*prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "rna_internal.h"
|
#include "rna_internal.h"
|
||||||
|
|
||||||
#include "DNA_armature_types.h"
|
#include "DNA_armature_types.h"
|
||||||
|
#include "DNA_mesh_types.h"
|
||||||
#include "DNA_modifier_types.h"
|
#include "DNA_modifier_types.h"
|
||||||
#include "DNA_object_types.h"
|
#include "DNA_object_types.h"
|
||||||
#include "DNA_object_force.h"
|
#include "DNA_object_force.h"
|
||||||
|
@ -148,8 +148,6 @@ EnumPropertyItem object_type_curve_items[] = {
|
|||||||
#include "BKE_scene.h"
|
#include "BKE_scene.h"
|
||||||
#include "BKE_deform.h"
|
#include "BKE_deform.h"
|
||||||
|
|
||||||
#include "BLI_editVert.h" /* for EditMesh->mat_nr */
|
|
||||||
|
|
||||||
#include "ED_mesh.h"
|
#include "ED_mesh.h"
|
||||||
#include "ED_object.h"
|
#include "ED_object.h"
|
||||||
#include "ED_particle.h"
|
#include "ED_particle.h"
|
||||||
|
@ -256,7 +256,6 @@ EnumPropertyItem image_color_depth_items[] = {
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_threads.h"
|
#include "BLI_threads.h"
|
||||||
#include "BLI_editVert.h"
|
|
||||||
|
|
||||||
#include "BKE_brush.h"
|
#include "BKE_brush.h"
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
#define DO_PROFILE 0
|
#define DO_PROFILE 0
|
||||||
|
|
||||||
#include "BLI_editVert.h"
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_string.h"
|
#include "BLI_string.h"
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_editVert.h" /* lasso tessellation */
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_scanfill.h" /* lasso tessellation */
|
#include "BLI_scanfill.h" /* lasso tessellation */
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
@ -230,9 +229,9 @@ static void wm_gesture_draw_circle(wmGesture *gt)
|
|||||||
|
|
||||||
static void draw_filled_lasso(wmGesture *gt)
|
static void draw_filled_lasso(wmGesture *gt)
|
||||||
{
|
{
|
||||||
EditVert *v=NULL, *lastv=NULL, *firstv=NULL;
|
ScanFillVert *v=NULL, *lastv=NULL, *firstv=NULL;
|
||||||
/* EditEdge *e; */ /* UNUSED */
|
/* EditEdge *e; */ /* UNUSED */
|
||||||
EditFace *efa;
|
ScanFillFace *efa;
|
||||||
short *lasso= (short *)gt->customdata;
|
short *lasso= (short *)gt->customdata;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user