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:
authorNicholas Bishop <nicholasbishop@gmail.com>2007-01-02 21:42:41 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2007-01-02 21:42:41 +0300
commit557f2b5c8de8a37a72a994884c280ecf61b78576 (patch)
tree55dd6341aa4713df4b69a45db6c0fbf70af2349c /source/blender/src/multires.c
parent60c2a7eeae6cabfbd43a0ffc95f5bab9f5175d51 (diff)
Disabled interaction between multires and shape keys. Attempting to add a shape key on a multires mesh will give an error, and attempting to add multires to a mesh with shape keys will give the user an okee before deleting shape keys. (This isn't an optimal solution to the multires/shapekey situation, but a real fix is non-trivial.)
Diffstat (limited to 'source/blender/src/multires.c')
-rw-r--r--source/blender/src/multires.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/src/multires.c b/source/blender/src/multires.c
index f5690f4eba4..c777a218007 100644
--- a/source/blender/src/multires.c
+++ b/source/blender/src/multires.c
@@ -37,6 +37,7 @@
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
+#include "DNA_key_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
@@ -48,6 +49,7 @@
#include "BKE_customdata.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
+#include "BKE_key.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
@@ -616,13 +618,26 @@ void multires_update_deformverts(Multires *mr, CustomData *src)
void multires_make(void *ob, void *me_v)
{
Mesh *me= me_v;
- MultiresLevel *lvl= MEM_callocN(sizeof(MultiresLevel), "multires level");
+ MultiresLevel *lvl;
EditMesh *em= G.obedit ? G.editMesh : NULL;
EditVert *eve= NULL;
EditFace *efa= NULL;
EditEdge *eed= NULL;
-
+ Key *key;
int i;
+
+ /* Check for shape keys */
+ key= me->key;
+ if(key) {
+ int ret= okee("Adding multires will delete all shape keys, proceed?");
+ if(ret) {
+ free_key(key);
+ me->key= NULL;
+ } else
+ return;
+ }
+
+ lvl= MEM_callocN(sizeof(MultiresLevel), "multires level");
waitcursor(1);