Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-11-21 14:53:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-11-21 14:53:30 +0300
commit307ad085fcc19cff837064009976e0d92c6a22e9 (patch)
treef3fd8e68cc6281a9b86c0c3ab2d4ae50da3691e0 /source/blender/python/api2_2x
parent3a8328784e98f7d32406ee9b5dd462476905f54b (diff)
wizard_curve2tree.py - always use active object (local view was messing up the context)
Mesh.c - mesh.faces.extend([..., smooth=True]) - smooth keyword argument, in a number of places was looping through all faces just to smooth them. mesh_skin.py - smooth by default
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r--source/blender/python/api2_2x/Mesh.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 5dffb488b3d..8a832d0deeb 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -5004,7 +5004,8 @@ static PyObject *MFaceSeq_extend( BPy_MEdgeSeq * self, PyObject *args,
Mesh *mesh = self->mesh;
int ignore_dups = 0;
PyObject *return_list = NULL;
-
+ char flag = ME_FACE_SEL;
+
/* before we try to add faces, add edges; if it fails; exit */
tmp = MEdgeSeq_extend( self, args );
@@ -5034,6 +5035,20 @@ static PyObject *MFaceSeq_extend( BPy_MEdgeSeq * self, PyObject *args,
return_list = PyList_New( 0 );
}
}
+
+ res = PyDict_GetItemString( keywds, "smooth" );
+ if (res) {
+ switch( PyObject_IsTrue( res ) ) {
+ case 0:
+ break;
+ case -1:
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "keyword argument \"smooth\" expected True/False or 0/1" );
+ default:
+ flag |= ME_SMOOTH;
+
+ }
+ }
}
/* make sure we get a tuple of sequences of something */
@@ -5319,7 +5334,7 @@ static PyObject *MFaceSeq_extend( BPy_MEdgeSeq * self, PyObject *args,
tmpface->v3 = tmppair->v[index[2]];
tmpface->v4 = tmppair->v[index[3]];
- tmpface->flag = ME_FACE_SEL;
+ tmpface->flag = flag;
if( return_list ) {
tmp = PyInt_FromLong( mesh->totface );