[Bf-python] mesh.filename

Stephen Swaney sswaney at centurytel.net
Sat Feb 12 20:39:17 CET 2005


On Sat, Feb 12, 2005 at 03:34:28AM +0000, Campbell Barton wrote:
> Yeah, thats what I ment, sorry for not being Clear-

It's ok.  One of the problems with email is that ideas that could be
explained in a few seconds with two people standing at a whiteboard
take 2 or 3 rounds of email to get straight.

> AFAIK every datatype with an ID (the id C struct) - Has a filename slot 
> 160 chars, even if its not used by blender.
> Many blender datatypes have an ID, and many are linkable so I dont see 
> why we shouldent accsess them from Python.

> A common problem is moving a blend file from Computer to computer and 
> having the Paths screw up, particulaly if there not relative, but even 
> the slashes can stuff up Win/Unix.

A lot of animation houses set up Asset Management Systes, which I
guess is just an expensive name for a shared file server.

This *is* a problem, though.  It makes me wonder about a generic
solution.  A Blender NameServer or ResourceLocator or Translator?  But
I am babbling!

> For my- being able to reset the library linking would be realy usefull-
> It should be the same as for images.

Tell us more about how you see this working.  Are you going to rebuild
the mesh yourself via python?  Or set the filename and have Blender
reload it?


> Non linked data can return "" or None,  will look into itm probably make 
> it work like Packed images alredy do- Would you accept a patch that does 
> this? all things non buggy etc?

Non-buggy AND with some documentation?

UPDATE:

I was just doing some code browsing.  The filename is part of a
Library struct rather than ID.  From the code comments: * For each
library file used, a Library struct is added to Main .  Maybe the
place to be editing filenames is not at the Mesh object but in the
list of Library blocks in Main?

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list