forked from bartvdbraak/blender
Bugfix #5600:
When clicking on the basis curve of a Curve's shapekeys in the IPO Editor with 'Relative' turned off, Blender crashed. This was caused by the call to set_sculpt_object() which only works on meshes (at the moment). I've added a check to make sure this is only called for meshes. Also, silenced the 'implicit declaration' warning my compiler was giving me about this function.
This commit is contained in:
parent
8fe3de0618
commit
770e816cee
@ -203,6 +203,8 @@ EditIpo *get_active_editipo(void)
|
|||||||
|
|
||||||
static void set_active_key(int index)
|
static void set_active_key(int index)
|
||||||
{
|
{
|
||||||
|
extern void set_sculpt_object(Object *ob);
|
||||||
|
|
||||||
if(G.sipo->blocktype==ID_KE && G.sipo->from) {
|
if(G.sipo->blocktype==ID_KE && G.sipo->from) {
|
||||||
Object *ob= (Object *)G.sipo->from;
|
Object *ob= (Object *)G.sipo->from;
|
||||||
Key *key= ob_get_key(ob);
|
Key *key= ob_get_key(ob);
|
||||||
@ -215,7 +217,10 @@ static void set_active_key(int index)
|
|||||||
ob->shapenr= index;
|
ob->shapenr= index;
|
||||||
ob->shapeflag |= OB_SHAPE_TEMPLOCK;
|
ob->shapeflag |= OB_SHAPE_TEMPLOCK;
|
||||||
|
|
||||||
|
/* only meshes have sculptmode */
|
||||||
|
if (ob->type==OB_MESH) {
|
||||||
set_sculpt_object(ob);
|
set_sculpt_object(ob);
|
||||||
|
}
|
||||||
|
|
||||||
/* calc keypos */
|
/* calc keypos */
|
||||||
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
|
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
|
||||||
|
Loading…
Reference in New Issue
Block a user