diff options
author | Ton Roosendaal <ton@blender.org> | 2005-10-25 00:47:28 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-10-25 00:47:28 +0400 |
commit | ce89799d3610329aed47dbde7ffb34d81c2c613b (patch) | |
tree | 2005505fce6f84a7bec47c3954743239cd9f42ef /source/blender/src/headerbuttons.c | |
parent | e78e8976ffb874ea8e01c696149d6f85c3aa9869 (diff) |
Bugfix #3242
Ipo WIndow, "Make single user" button crashed. Forgot to recode 2 weeks ago
Diffstat (limited to 'source/blender/src/headerbuttons.c')
-rw-r--r-- | source/blender/src/headerbuttons.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index 13c46536fbb..afe4ac91a57 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -1867,23 +1867,9 @@ void do_global_buttons2(short event) if(idfrom && idfrom->lib==NULL) { if(ipo->id.us>1) { if(okee("Single user")) { - if(ipo->blocktype==ID_OB) ((Object *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_MA) ((Material *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_TE) ((Tex *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_SEQ) ((Sequence *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_CU) ((Curve *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_KE) ((Key *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_LA) ((Lamp *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_WO) ((World *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_CA) ((Camera *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_SO) ((bSound *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_AC) - get_hilighted_action_channel((bAction *)idfrom)->ipo= copy_ipo(ipo); - else if(ipo->blocktype==ID_CO) - get_active_constraint_channel((Object*)idfrom)->ipo= copy_ipo(ipo); - else error("Warn bugtracker!"); - - ipo->id.us--; + ipo= copy_ipo(ipo); + ipo->id.us= 0; /* assign_ipo adds users, copy_ipo sets to 1 */ + spaceipo_assign_ipo(G.sipo, ipo); allqueue(REDRAWIPO, 0); } } |