[Bf-committers] Native path handling for blender

Yomgui yomgui1 at gmail.com
Thu Feb 23 13:21:26 CET 2006


I've recoded blenlib/util.h. Now I'm working on src/filesel.c.
Check given files (caution, it's not usable as it because you need to
modify the rest of Blender and I've not tested if it compiles on

Some functions have been removed : duplicate features or not needed anymore.
There is some confusion on Windows with '/' and '\', I don't know if
all Windows API support both. I've seen that Blender code resolves
that by switching them...
But bring a support of both to users it's a nightmare to handle in Blender.
A solution to keep the feature without complexify the code is to
search where are all external paths input (like from UI, from an
external lib or from a file), then put a switch at this level only to
be sure that all paths are really native and supported internally. So,
internal code will be more simple because we've made an assumption on
how paths are written.

This work is very interesting because I've already removed many of
buffer overflow ;-)

> Date: Thu, 23 Feb 2006 01:28:11 +1100
> From: Campbell Barton <cbarton at metavr.com>
> Subject: Re: [Bf-committers] Native path handling for blender
> To: bf-blender developers <bf-committers at projects.blender.org>
> Always wondered why Blender didnt use ./ rather then //.
> Probably dont use a # since Blender alredy uses hashes in the filename
> to be replaced with the current frame number.
> Dont realy mind what special char is used aside from that.

Ok, I've used '@' for now... maybe the best solution is something like $ROOT/xxx
or $@/xxx if we don't want to interact with some env var in futur.

> Though, cant the conversion also do things like say- Dont use // for
> Morph OS to go back a dir? I suppose Win32 paths work ok in Windows so
> why remove functionality from morphos. :/
> Yomgui wrote:
> > I've forgotten to say an important thing:
> >
> > There is only one thing that break my idea of using native path for Blender:
> > We use '//' to relative blender's path like this : '//xxx/yyy'
> > It's not possible to use that on my platform, because '//' equals 'parent dir'!
> > and maybe it's not so good on others platforms too...
> >
> > I propose this: '#/xxx/yyy' like in Scons or '%/xxx/yyy' or '@/xxx/yyy'.
> >
> > Any ideas?
> >
> > Regards,
> > Guillaume
-------------- next part --------------
A non-text attachment was scrubbed...
Name: util.c.gz
Type: application/x-gzip
Size: 9440 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20060223/9a626462/util.c.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BLI_blenlib.h.gz
Type: application/x-gzip
Size: 4819 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20060223/9a626462/BLI_blenlib.h.bin

More information about the Bf-committers mailing list