[Bf-python] Library.Open() - relative paths

Campbell Barton cbarton at metavr.com
Thu Oct 12 04:45:33 CEST 2006


Martin Poirier wrote:
> --- Campbell Barton <cbarton at metavr.com> wrote:
>
>   
>> Hi,
>> Malefico needs to get python to open up relative
>> blend's
>> say Library.Open('//foo.blend')
>>
>> Currently this isnt supported because Library.c's 
>> M_Library_Open func 
>> calls  readblenentry.c's  BLO_blendhandle_from_file
>> that calls
>> readfile.c's blo_openblenderfile
>>
>> and
>> blo_openblenderfile dosnt support relative paths.
>>
>> Im a bit buisy right now to fix this so Id
>> appreciate it if one of the 
>> other  c/python'ers  could solve this one.
>> - Cam
>>     
>
> Tell him to use the os.path module to "unrelativize"
> the paths.
>
> Martin
>   
I dont think thats what he needs. - making a path unrelative with 
Blender.sys.expandpath() would work but they want blender to have the 
data linked to a relative path. so I assume people can load it on there 
own workstation and have the blend referenced relatively.
basically blender needs to accept and store relative paths from Python.



-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list