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-02-11 05:21:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-02-11 05:21:26 +0300
commitb90a0ce285a3a71c2a6e617baabc08fe11624c7f (patch)
tree17bb85fd274460771508b01ca409bfc1a6e35dd7 /source/blender/python/api2_2x/Mesh.c
parentcf00e675edd30b0cfd69ed14677dd90111f38348 (diff)
Made multires and shape keys throw errors when adding if the other existed (so both can never coexist) documented this too.
Diffstat (limited to 'source/blender/python/api2_2x/Mesh.c')
-rw-r--r--source/blender/python/api2_2x/Mesh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 366d4d850d1..d2e68b426c7 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -6323,6 +6323,10 @@ static PyObject *Mesh_insertKey( BPy_Mesh * self, PyObject * args )
char *type = NULL;
short typenum;
+ if (mesh->mr)
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "Shape Keys cannot be added to meshes with multires" );
+
if( !PyArg_ParseTuple( args, "|is", &fra, &type ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected nothing or an int and optionally a string as arguments" );
@@ -7301,6 +7305,9 @@ static int Mesh_setFlag( BPy_Mesh * self, PyObject *value, void *type )
}
} else {
if ( !mesh->mr ) {
+ if (mesh->key)
+ return EXPP_ReturnIntError( PyExc_RuntimeError,
+ "Cannot enable multires for a mesh with shape keys" );
multires_make(self->object, mesh);
}
}