Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/convertblender.c
| Context not available. | |||||
| } | } | ||||
| #ifdef WITH_FREESTYLE | #ifdef WITH_FREESTYLE | ||||
| static EdgeHash *make_freestyle_edge_mark_hash(Mesh *me, DerivedMesh *dm) | static EdgeHash *make_freestyle_edge_mark_hash(DerivedMesh *dm) | ||||
| { | { | ||||
| EdgeHash *edge_hash= NULL; | EdgeHash *edge_hash= NULL; | ||||
| FreestyleEdge *fed; | FreestyleEdge *fed; | ||||
| MEdge *medge; | MEdge *medge; | ||||
| int totedge, a; | int totedge, a; | ||||
| const int *index; | |||||
| medge = dm->getEdgeArray(dm); | medge = dm->getEdgeArray(dm); | ||||
| totedge = dm->getNumEdges(dm); | totedge = dm->getNumEdges(dm); | ||||
| index = dm->getEdgeDataArray(dm, CD_ORIGINDEX); | fed = dm->getEdgeDataArray(dm, CD_FREESTYLE_EDGE); | ||||
| fed = CustomData_get_layer(&me->edata, CD_FREESTYLE_EDGE); | |||||
| if (fed) { | if (fed) { | ||||
| edge_hash = BLI_edgehash_new(__func__); | edge_hash = BLI_edgehash_new(__func__); | ||||
| if (!index) { | for (a = 0; a < totedge; a++) { | ||||
| if (me->totedge == totedge) { | if (fed[a].flag & FREESTYLE_EDGE_MARK) { | ||||
| for (a = 0; a < me->totedge; a++) { | BLI_edgehash_insert(edge_hash, medge[a].v1, medge[a].v2, medge + a); | ||||
| if (fed[a].flag & FREESTYLE_EDGE_MARK) { | |||||
| BLI_edgehash_insert(edge_hash, medge[a].v1, medge[a].v2, medge + a); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| else { | |||||
| for (a = 0; a < totedge; a++) { | |||||
| if (index[a] == ORIGINDEX_NONE) | |||||
| continue; | |||||
| if (fed[index[a]].flag & FREESTYLE_EDGE_MARK) | |||||
| BLI_edgehash_insert(edge_hash, medge[a].v1, medge[a].v2, medge+a); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| EdgeHash *edge_hash; | EdgeHash *edge_hash; | ||||
| /* create a hash table of Freestyle edge marks */ | /* create a hash table of Freestyle edge marks */ | ||||
| edge_hash = make_freestyle_edge_mark_hash(me, dm); | edge_hash = make_freestyle_edge_mark_hash(dm); | ||||
| #endif | #endif | ||||
| /* store customdata names, because DerivedMesh is freed */ | /* store customdata names, because DerivedMesh is freed */ | ||||
| Context not available. | |||||