== Multires ==
Fixed bug [#6798] Multires eventually destroys Meshes with Shapekys * Moved the check for multires on adding shapekeys into insert_shapekeys rather than on the "Add Shape" button click
This commit is contained in:
parent
0016aa9e71
commit
4287796f61
@ -602,11 +602,7 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case B_ADDKEY:
|
case B_ADDKEY:
|
||||||
if(get_mesh(ob) && get_mesh(ob)->mr) {
|
insert_shapekey(ob);
|
||||||
error("Cannot create shape keys on a multires mesh.");
|
|
||||||
} else {
|
|
||||||
insert_shapekey(ob);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case B_SETKEY:
|
case B_SETKEY:
|
||||||
ob->shapeflag |= OB_SHAPE_TEMPLOCK;
|
ob->shapeflag |= OB_SHAPE_TEMPLOCK;
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
#include "BKE_key.h"
|
#include "BKE_key.h"
|
||||||
#include "BKE_library.h"
|
#include "BKE_library.h"
|
||||||
#include "BKE_main.h"
|
#include "BKE_main.h"
|
||||||
|
#include "BKE_mesh.h"
|
||||||
#include "BKE_object.h"
|
#include "BKE_object.h"
|
||||||
#include "BKE_utildefines.h"
|
#include "BKE_utildefines.h"
|
||||||
|
|
||||||
@ -599,21 +600,26 @@ void insert_curvekey(Curve *cu, short rel)
|
|||||||
|
|
||||||
void insert_shapekey(Object *ob)
|
void insert_shapekey(Object *ob)
|
||||||
{
|
{
|
||||||
Key *key;
|
if(get_mesh(ob) && get_mesh(ob)->mr) {
|
||||||
|
error("Cannot create shape keys on a multires mesh.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Key *key;
|
||||||
|
|
||||||
if(ob->type==OB_MESH) insert_meshkey(ob->data, 1);
|
if(ob->type==OB_MESH) insert_meshkey(ob->data, 1);
|
||||||
else if ELEM(ob->type, OB_CURVE, OB_SURF) insert_curvekey(ob->data, 1);
|
else if ELEM(ob->type, OB_CURVE, OB_SURF) insert_curvekey(ob->data, 1);
|
||||||
else if(ob->type==OB_LATTICE) insert_lattkey(ob->data, 1);
|
else if(ob->type==OB_LATTICE) insert_lattkey(ob->data, 1);
|
||||||
|
|
||||||
key= ob_get_key(ob);
|
key= ob_get_key(ob);
|
||||||
ob->shapenr= BLI_countlist(&key->block);
|
ob->shapenr= BLI_countlist(&key->block);
|
||||||
|
|
||||||
allspace(REMAKEIPO, 0);
|
allspace(REMAKEIPO, 0);
|
||||||
allqueue(REDRAWIPO, 0);
|
allqueue(REDRAWIPO, 0);
|
||||||
allqueue(REDRAWACTION, 0);
|
allqueue(REDRAWACTION, 0);
|
||||||
allqueue(REDRAWNLA, 0);
|
allqueue(REDRAWNLA, 0);
|
||||||
allqueue(REDRAWBUTSOBJECT, 0);
|
allqueue(REDRAWBUTSOBJECT, 0);
|
||||||
allqueue(REDRAWBUTSEDIT, 0);
|
allqueue(REDRAWBUTSEDIT, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void delete_key(Object *ob)
|
void delete_key(Object *ob)
|
||||||
|
Loading…
Reference in New Issue
Block a user