[Bf-python] Setting the filename of an image

Campbell J Barton cbarton at metavr.com
Sat Feb 5 07:34:36 CET 2005


Hi, attached is a patch which allows you to set the path of an image in Blender-
This is nice since somtimes you want to replace an image in Python without doing
it manually-

Rationale
I added it in because I have some large scenes thats ise over 150 images and
when I change computers some files are referenced absolutely,
Being able to set the names allows me to look for the files in the current dir
and set the new names.
also allows Python to automaticly set the filenames correctly if they didnt load
for whatever resion.

I also import models from 3dsmax, some have realy badly arranged texture DIR's,
this allows me to quickly code a script to do a search for the textures, ignore
extensions, case etc- and search the path.

The patch conforms to 160 chars for the filename length- No segfaults if the
name is huge, just concatinates it.

- Cam

-- 
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 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: im_fname_patch.txt
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20050205/1f922ed0/attachment.txt>


More information about the Bf-python mailing list