code cleanup: remove unused variable assignents and added bmesh submodule links, doc correction reported by dfelinto.

This commit is contained in:
Campbell Barton 2012-03-09 21:23:15 +00:00
parent 4908ded534
commit 4dc35836ad
6 changed files with 12 additions and 13 deletions

@ -82,7 +82,7 @@ You might want to reference a script relative to the blend file.
import bpy
import os
filename = os.path.join(os.path.basename(bpy.data.filepath), "myscript.py")
filename = os.path.join(os.path.dirname(bpy.data.filepath), "myscript.py")
exec(compile(open(filename).read(), filename, 'exec'))

@ -2303,17 +2303,14 @@ int mesh_recalcTessellation(CustomData *fdata,
else if (mp->totloop == 3) {
ml = mloop + mp->loopstart;
ML_TO_MF(0, 1, 2)
mface_index++;
}
else if (mp->totloop == 4) {
#ifdef USE_TESSFACE_QUADS
ml = mloop + mp->loopstart;
ML_TO_MF_QUAD()
mface_index++;
#else
ml = mloop + mp->loopstart;
ML_TO_MF(0, 1, 2)
mface_index++;
ML_TO_MF(0, 2, 3)

@ -2484,7 +2484,6 @@ static void createTransUVs(bContext *C, TransInfo *t)
if (!BM_elem_flag_test(efa, BM_ELEM_TAG))
continue;
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
if (!propmode && !uvedit_uv_selected(em, scene, l))
continue;

@ -1100,8 +1100,6 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
select= 1;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
a = 0;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
iterv1= uv_vertex_map_get(vmap, efa, a);

@ -989,12 +989,13 @@ static void correct_uv_aspect(BMEditMesh *em)
BMFace *efa= BM_active_face_get(em->bm, TRUE);
BMLoop *l;
BMIter iter, liter;
MTexPoly *tf;
MLoopUV *luv;
float scale, aspx= 1.0f, aspy=1.0f;
if(efa) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
if (efa) {
MTexPoly *tf;
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
ED_image_uv_aspect(tf->tpage, &aspx, &aspy);
}
@ -1005,7 +1006,6 @@ static void correct_uv_aspect(BMEditMesh *em)
scale= aspy/aspx;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT) || BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
continue;
@ -1019,7 +1019,6 @@ static void correct_uv_aspect(BMEditMesh *em)
scale= aspx/aspy;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)||BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
continue;

@ -81,7 +81,13 @@ static struct PyMethodDef BPy_BM_methods[] = {
};
PyDoc_STRVAR(BPy_BM_doc,
"This module provides access to blenders bmesh data structures."
"This module provides access to blenders bmesh data structures.\n"
"\n"
"\n"
"Submodules:\n"
"\n"
"* :mod:`bmesh.utils`\n"
"* :mod:`bmesh.types`\n"
);
static struct PyModuleDef BPy_BM_module_def = {
PyModuleDef_HEAD_INIT,