diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2005-10-03 23:12:11 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2005-10-03 23:12:11 +0400 |
commit | 080b7f09022f2407eab861e239bc32ef23a15a14 (patch) | |
tree | d5756c598b77f05854abecff094304c060910665 /source/blender/blenloader/intern/readfile.c | |
parent | fde63008a590ec32c26b384975012719b5cae7c5 (diff) |
BPython bug fixes:
- #2781, reported by Ed Blake: crash on undo when there were active space handlers. Space Handler script links belong to screen areas, which do not get saved on undo. Thanks Ton for pointing out the function that restores ui pointers gone bad.
- Applied patch #2822 by Ken Hughes for bug #2647 ("Setting a Face UV"), reported by Campbell Barton.
- #3022, reported by Timothy Wakeham: "Blender.BGL.glDrawPixels crashes when drawing more pixels then buffer size". Made glDrawPixels check buffer dimensions.
- #2882, reported by Campbell: crash in nmesh.getMaterials(arg == 0 or 1) when nmesh came from GetRawFromMesh(). Raw nmeshes are not linked to Blender meshes, so the method doesn't support these options (getting mat info from the actual mesh) for it.
- #2817, reported by Tod Koeckeritz: Dir_Depth var was not being decremented in BPY_Menus.c, causing dir depth limits to be reached prematurely.
- #2954, reported by Daniel Holtz: "Python scripts crash hard with valid windows paths". Blender.Load() was not meant for background mode, now it's been update to support it, using BKE_read_file instead of BIF_read_file in this case. Also found another issue with command line scripts using Blender.Load() that could crash Blender: trying to free the Text when it wasn't available anymore (loading a new .blend already removed it). There are still issues with one case, though, causing a crash on start or "Memoryblock winopen: double free" at end, when running a script that is already a Blender Text (only if the script calls Blender.Load, of course). Will investigate.
- #2897: reported by Timothy Wakeham: object.setMaterials was asking the length of a Python list w/o confirming first if the passed obj was really a list.
Thanks all for the help and for being patient (long delay, again).
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 54b4e494169..3213ac6cc49 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2855,6 +2855,16 @@ void lib_link_screen_restore(Main *newmain, Scene *curscene) while(sa) { SpaceLink *sl; + if (sa->scriptlink.totscript) { + /* restore screen area script links */ + ScriptLink *slink = &sa->scriptlink; + int script_idx; + for (script_idx = 0; script_idx < slink->totscript; script_idx++) { + slink->scripts[script_idx] = restore_pointer_by_name(newmain, + (ID *)slink->scripts[script_idx], 1); + } + } + for (sl= sa->spacedata.first; sl; sl= sl->next) { if(sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D*) sl; |