make_uv_vert_map() was looping over the texture face for not reason.

This commit is contained in:
2011-10-30 06:53:25 +00:00
parent f708318833
commit c4fa7bf286
2 changed files with 5 additions and 9 deletions

View File

@@ -1317,7 +1317,6 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
UvVertMap *vmap; UvVertMap *vmap;
UvMapVert *buf; UvMapVert *buf;
MFace *mf; MFace *mf;
MTFace *tf;
unsigned int a; unsigned int a;
int i, totuv, nverts; int i, totuv, nverts;
@@ -1325,8 +1324,7 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
/* generate UvMapVert array */ /* generate UvMapVert array */
mf= mface; mf= mface;
tf= tface; for(a=0; a<totface; a++, mf++)
for(a=0; a<totface; a++, mf++, tf++)
if(!selected || (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL))) if(!selected || (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL)))
totuv += (mf->v4)? 4: 3; totuv += (mf->v4)? 4: 3;
@@ -1346,8 +1344,7 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
} }
mf= mface; mf= mface;
tf= tface; for(a=0; a<totface; a++, mf++) {
for(a=0; a<totface; a++, mf++, tf++) {
if(!selected || (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL))) { if(!selected || (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL))) {
nverts= (mf->v4)? 4: 3; nverts= (mf->v4)? 4: 3;
@@ -1363,7 +1360,6 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
} }
/* sort individual uvs for each vert */ /* sort individual uvs for each vert */
tf= tface;
for(a=0; a<totvert; a++) { for(a=0; a<totvert; a++) {
UvMapVert *newvlist= NULL, *vlist=vmap->vert[a]; UvMapVert *newvlist= NULL, *vlist=vmap->vert[a];
UvMapVert *iterv, *v, *lastv, *next; UvMapVert *iterv, *v, *lastv, *next;
@@ -1375,14 +1371,14 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
v->next= newvlist; v->next= newvlist;
newvlist= v; newvlist= v;
uv= (tf+v->f)->uv[v->tfindex]; uv= tface[v->f].uv[v->tfindex];
lastv= NULL; lastv= NULL;
iterv= vlist; iterv= vlist;
while(iterv) { while(iterv) {
next= iterv->next; next= iterv->next;
uv2= (tf+iterv->f)->uv[iterv->tfindex]; uv2= tface[iterv->f].uv[iterv->tfindex];
sub_v2_v2v2(uvdiff, uv2, uv); sub_v2_v2v2(uvdiff, uv2, uv);

View File

@@ -410,7 +410,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_string(func, "prop_list", "", 0, "", parm= RNA_def_string(func, "prop_list", "", 0, "",
"Identifier of a string property in each data member, specifying which " "Identifier of a string property in each data member, specifying which "
"of its properties should have a widget displayed in its row."); "of its properties should have a widget displayed in its row");
RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX); RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX);
RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX); RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX);
RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use"); RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use");