diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-03 15:48:16 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-03 15:48:16 +0300 |
commit | 8a2a7687f4a7eecd49996251303b5eaed23d995d (patch) | |
tree | 5f06cd44db96b9b23b96141d5b867dfc4316e7a5 | |
parent | 486c3cd937782bb7bb7feae3bc6ecf9a65141fd6 (diff) |
Bugfix #25457
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)
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 9 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 8 |
2 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index dae00636370..3f18e7f3723 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -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); - */ } diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 5938f661ca8..5403699a0b3 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -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"); |