code cleanup: remove unused variable assignents and added bmesh submodule links,...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 9 Mar 2012 21:23:15 +0000 (21:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 9 Mar 2012 21:23:15 +0000 (21:23 +0000)
doc/python_api/rst/info_tips_and_tricks.rst
source/blender/blenkernel/intern/mesh.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/python/bmesh/bmesh_py_api.c

index 0b9404906e23e86e82e109ceb8545b4bf78b7540..521031f5e6130422218494b0cddfc8220d37029d 100644 (file)
@@ -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'))
 
 
index 446f15020206cbc26a2ea50f39db1518a159c7f7..909a87cfd4bfa27664d9dc15516082d136eacb27 100644 (file)
@@ -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)
index cce8e4cca56bebcb165cdb7efba5d5e5f7b1a7f0..4dbf87fb5001bc90bf10bc0b92414e95e31008e2 100644 (file)
@@ -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;
index 15d8a6440352781eb9ea4e8fe76b66a98afce036..28981d5579319f0fe2a89d2a60861b75cedb3077 100644 (file)
@@ -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);
index 85bf3064d7fb59a15eaa7930fa4735cc52242608..cfb0128486a97ef8490c943937c59042a16f0987 100644 (file)
@@ -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;
                        
index 375e7cfae14827a67108bf50d85ba57ea3567b38..77b19026501d852c406d20576d6020f47b9f124a 100644 (file)
@@ -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,