After loading file, the Undo-push happened too early, causing an
undo for the first action to show animated setups wrong.

(material.c: removed old crap)
This commit is contained in:
Ton Roosendaal
2011-01-03 12:48:16 +00:00
parent 486c3cd937
commit 8a2a7687f4
2 changed files with 5 additions and 12 deletions

View File

@@ -1341,7 +1341,6 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
/* copy/paste buffer, if we had a propper py api that would be better */
Material matcopybuf;
// MTex mtexcopybuf;
static short matcopied=0;
void clear_matcopybuf(void)
@@ -1352,7 +1351,6 @@ void clear_matcopybuf(void)
void free_matcopybuf(void)
{
// extern MTex mtexcopybuf; /* buttons.c */
int a;
for(a=0; a<MAX_MTEX; a++) {
@@ -1373,7 +1371,6 @@ void free_matcopybuf(void)
MEM_freeN(matcopybuf.nodetree);
matcopybuf.nodetree= NULL;
}
// default_mtex(&mtexcopybuf);
matcopied= 0;
}
@@ -1442,10 +1439,4 @@ void paste_matcopybuf(Material *ma)
}
ma->nodetree= ntreeCopyTree(matcopybuf.nodetree, 0);
/*
BIF_preview_changed(ID_MA);
BIF_undo_push("Paste material settings");
scrarea_queue_winredraw(curarea);
*/
}

View File

@@ -305,9 +305,6 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports)
write_history();
}
// XXX undo_editmode_clear();
BKE_reset_undo();
BKE_write_undo(C, "original"); /* save current state */
WM_event_add_notifier(C, NC_WM|ND_FILEREAD, NULL);
// refresh_interface_font();
@@ -323,6 +320,11 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports)
BPY_load_user_modules(C);
#endif
CTX_wm_window_set(C, NULL); /* exits queues */
// XXX undo_editmode_clear();
BKE_reset_undo();
BKE_write_undo(C, "original"); /* save current state */
}
else if(retval==1)
BKE_write_undo(C, "Import file");