Fixed some crashes with undo, when going back to the initial state of the file.
This commit is contained in:
@@ -1275,8 +1275,10 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha
|
||||
/* 'hide' flag is now used for keytype - only 'keyframes' existed before */
|
||||
dst->hide= BEZT_KEYTYPE_KEYFRAME;
|
||||
|
||||
/* correct values for euler rotation curves - they were degrees/10 */
|
||||
// XXX for now, just make them into radians as RNA sets/reads directly in that form
|
||||
/* correct values for euler rotation curves
|
||||
* - they were degrees/10
|
||||
* - we need radians for RNA to do the right thing
|
||||
*/
|
||||
if ( ((icu->blocktype == ID_OB) && ELEM3(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
|
||||
((icu->blocktype == ID_PO) && ELEM3(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z)) )
|
||||
{
|
||||
|
||||
@@ -4876,24 +4876,12 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
|
||||
else if(sl->spacetype==SPACE_IPO) {
|
||||
SpaceIpo *sipo= (SpaceIpo *)sl;
|
||||
bDopeSheet *ads= sipo->ads;
|
||||
|
||||
/* XXX animato */
|
||||
#if 0
|
||||
sipo->ipo= restore_pointer_by_name(newmain, (ID *)sipo->ipo, 0);
|
||||
if(sipo->blocktype==ID_SEQ)
|
||||
sipo->from= (ID *)find_sequence_from_ipo_helper(newmain, sipo->ipo);
|
||||
else
|
||||
sipo->from= restore_pointer_by_name(newmain, (ID *)sipo->from, 0);
|
||||
|
||||
// not free sipo->ipokey, creates dependency with src/
|
||||
if(sipo->editipo) MEM_freeN(sipo->editipo);
|
||||
sipo->editipo= NULL;
|
||||
|
||||
#endif
|
||||
if(ads) {
|
||||
if(ads->filter_grp) {
|
||||
if (ads) {
|
||||
ads->source= restore_pointer_by_name(newmain, (ID *)ads->source, 1);
|
||||
|
||||
if (ads->filter_grp)
|
||||
ads->filter_grp= restore_pointer_by_name(newmain, (ID *)ads->filter_grp, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(sl->spacetype==SPACE_BUTS) {
|
||||
@@ -4918,12 +4906,12 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
|
||||
}
|
||||
else if(sl->spacetype==SPACE_ACTION) {
|
||||
SpaceAction *saction= (SpaceAction *)sl;
|
||||
|
||||
saction->action = restore_pointer_by_name(newmain, (ID *)saction->action, 1);
|
||||
saction->ads.source= restore_pointer_by_name(newmain, (ID *)saction->ads.source, 1);
|
||||
|
||||
if(saction->ads.filter_grp) {
|
||||
if (saction->ads.filter_grp)
|
||||
saction->ads.filter_grp= restore_pointer_by_name(newmain, (ID *)saction->ads.filter_grp, 0);
|
||||
}
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMAGE) {
|
||||
SpaceImage *sima= (SpaceImage *)sl;
|
||||
@@ -4933,9 +4921,12 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
|
||||
else if(sl->spacetype==SPACE_NLA){
|
||||
SpaceNla *snla= (SpaceNla *)sl;
|
||||
bDopeSheet *ads= snla->ads;
|
||||
|
||||
if (ads->filter_grp) {
|
||||
ads->filter_grp= restore_pointer_by_name(newmain, (ID *)ads->filter_grp, 0);
|
||||
|
||||
if (ads) {
|
||||
ads->source= restore_pointer_by_name(newmain, (ID *)ads->source, 1);
|
||||
|
||||
if (ads->filter_grp)
|
||||
ads->filter_grp= restore_pointer_by_name(newmain, (ID *)ads->filter_grp, 0);
|
||||
}
|
||||
}
|
||||
else if(sl->spacetype==SPACE_TEXT) {
|
||||
|
||||
Reference in New Issue
Block a user