diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-10 01:23:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-10 01:23:15 +0400 |
commit | 4dc35836addfcdc888c2e9e6129eb8a3604efa9b (patch) | |
tree | 610b2b4d0a71e507c9db5a75ca42775d52718116 | |
parent | 4908ded53436992412d1dfccd13b0716054341be (diff) |
code cleanup: remove unused variable assignents and added bmesh submodule links, doc correction reported by dfelinto.
-rw-r--r-- | doc/python_api/rst/info_tips_and_tricks.rst | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 1 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 9 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_api.c | 8 |
6 files changed, 12 insertions, 13 deletions
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst index 0b9404906e2..521031f5e61 100644 --- a/doc/python_api/rst/info_tips_and_tricks.rst +++ b/doc/python_api/rst/info_tips_and_tricks.rst @@ -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')) diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 446f1502020..909a87cfd4b 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -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) diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index cce8e4cca56..4dbf87fb500 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -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; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 15d8a644035..28981d55793 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -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); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 85bf3064d7f..cfb0128486a 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -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; diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c index 375e7cfae14..77b19026501 100644 --- a/source/blender/python/bmesh/bmesh_py_api.c +++ b/source/blender/python/bmesh/bmesh_py_api.c @@ -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, |