[Bf-committers] Patch for library loading

Michael Tiedtke michael.tiedtke at web.de
Sat Sep 4 22:41:27 CEST 2004


Hi,
the following steps crashed Blender 2.34 on Mac OS X:

1. The file "obj.blend" has relative links to another blender file.
2. Blender's currently opened file is not in the same directory as 
"obj.blend".
2. Now trying to open "obj.blend" will result in a crash.

The attached patch keeps blender from crashing,
but it doesn't find the library file in the above scenario.

This is because blender uses the path of the currently opened file when
searching for library files.[1] Therefore opening "obj.blend" a second 
time will resolve all library links.

[1] I have not found a clean way to fix this, but here is the call 
graph:
read_libraries -> blo_openblenderfile -> BLI_convertstringcode
The last function is called with 'G.sce' as the base path.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: readfile.diff
Type: application/octet-stream
Size: 472 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20040904/3f5c71e5/readfile.obj


More information about the Bf-committers mailing list