[Bf-python] Request for Plumiferos

Toni Alatalo antont at kyperjokki.fi
Thu Nov 2 17:11:40 CET 2006


Campbell Barton kirjoitti:
> Id realy like linked lib stuff to be transparent to python, one nice 
> addition would be a way to see if data was apart of a linked lib.
not sure what you mean by 'transparent' there, i suppose not the case 
where it is indistinguishable what is coming from a lib file and what is 
local in the scene :p (i guess you mean that py would expose the same 
things as gui)
> It may be worth adding a library type,
might be a nice way indeed,
would it be partly a similar container than scenes are?
> The Outliner currently allows you to get/set paths so it might be nice 
> if python could also.
> Library.GetLinked() - returns a list of library types.
does it really work this way in the internals, that you have libraries 
somehow linked? or is it that there are objects in the scene, and some 
of them use library data, and for those the outliner shows the linked 
icon - but that there is no notion of linked libs per se?

one thing that this got me thinking was that when i was struggling with 
the Library module during orange, reading the sources revealed that 
Blender can in some way have only a single blend / lib open. so when you 
do e.g. shift-f1 from the GUI to get to append stuff from some other 
blend, that other selected file replaces the current global thing, iirc. 
or was it that the current working file is kept separate, but the 
library that is opened is there as a global, and that there can be only 
one? anyhow based on that it seemed not that strange that the Library 
module reflected that arch so there is a global var, which is the lib 
file that is currently open, and that you can not open several libs at 
the same time.

did i misunderstand that back then, or are you unaware of that 
limitation, or did you see some way of overcoming that to achieve having 
several lib objects at hand using that new type?
> dont want to railroad this- maybe others could comment?
my 2 eurocents,
> - Cam
~Toni

>
> malefico andauer wrote:
>> Thanks for replying Campbell. Yes, if I could choose I
>> wouldn't use same names :-) , but I don't have any
>> options about it in my case.
>> This kind of problem would be trivial once we have
>> poseable linked groups, so we can pose a character
>> imported via link, and don't need to append it. Ton
>> told me he is going to work on that soon.
>>
>> However, there will still be situations in which I
>> have to apply a new version of material or texture to
>> meshes that have already been imported to scene file.
>>
>> Anyway, I hope this can be tackled in the near future
>> by some kind soul :-).
>>
>> Regards
>>
>> malefico
>>
>>  --- Campbell Barton <cbarton at metavr.com> escribió:
>>
>>  
>>> Hi Malefico, Iv been using linked libs recently and
>>> had similar problems
>>>
>>> my solution at the moment is to never have double
>>> names, so no Cube.001 ;)
>>>
>>> Long term Id like to impliment a solution.
>>>
>>> making Mesh.Get() only return local could be error
>>> prone, maybe  Mesh.Get(lib=None) or alternativly
>>> Mesh.Get(lib='//my_blend_lib')
>>>
>>> A function to get currently linked libs would be
>>> usefull also.
>>> Library.GetOpenLibs() ? - return a list of strings -
>>> like the outliner.
>>>
>>> that way you could get data from any lib.
>>>
>>> - Cam
>>>
>>>
>>>
>>> malefico andauer wrote:
>>>    
>>>> Hi there,
>>>>
>>>> My python guru at the studio prompted me with the
>>>> following problem, which I'll try to explain:
>>>>
>>>> He is coding a script to link materials and UV
>>>>       
>>> maps
>>>    
>>>> from library objects to same objects that have
>>>>       
>>> been
>>>    
>>>> imported and animated in different scenes, so we
>>>>       
>>> can    
>>>> change textures or UV map info in lib file, and
>>>>       
>>> then
>>>    
>>>> update all data in animated scenes by running this
>>>> script.
>>>>
>>>> Problem is if datablocks in lib file and anim file
>>>> have exactly the same name (as in this case) we
>>>>       
>>> can
>>>    
>>>> only read data from local (animated) file.
>>>>
>>>> For instance:
>>>>
>>>> Blender.Mesh.Get("character_X") returns local
>>>> Character X only. The one that was linked and had
>>>> exact same name is never returned.
>>>>
>>>> Blender.Mesh.Get() returns a list of all meshes
>>>> (included the ones linked from lib) so after this
>>>> calling we have duplicated names (the one in lib
>>>>       
>>> and
>>>    
>>>> the one in anim file) and thus we cannot tell
>>>>       
>>> which is
>>>    
>>>> which. He tried using index of this list to
>>>>       
>>> identify
>>>    
>>>> them, but this is random so we can't be sure.
>>>>
>>>> So what he suggests is: a new method that return
>>>>       
>>> all
>>>    
>>>> datablocks that are already linked from external
>>>> sources so we can tell which are local and which
>>>>       
>>> are
>>>    
>>>> external and also that Blender.Mesh.Get() returns
>>>>       
>>> only
>>>    
>>>> local datablocks, not external.
>>>>
>>>> Other way around could be that
>>>>       
>>> MeshObject.Library()
>>>    
>>>> returns path of library or "none" besides current
>>>> information, so source could be identified
>>>>       
>>> positively.
>>>    
>>>> I hope this is clear enough (I bet it isn't), any
>>>>       
>>> help
>>>    
>>>> either code or hints will be highly appreciated
>>>>
>>>> Regards and thanks in advance
>>>>
>>>> malefico.
>>>>
>>>>
>>>> __________________________________________________
>>>> Correo Yahoo!
>>>> Espacio para todos tus mensajes, antivirus y
>>>>       
>>> antispam ¡gratis!    
>>>> ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
>>>> _______________________________________________
>>>> Bf-python mailing list
>>>> Bf-python at projects.blender.org
>>>>
>>>>       
>> http://projects.blender.org/mailman/listinfo/bf-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
>>>
>>> _______________________________________________
>>> Bf-python mailing list
>>> Bf-python at projects.blender.org
>>>
>>>     
>> http://projects.blender.org/mailman/listinfo/bf-python
>>  
>>
>> __________________________________________________
>> Correo Yahoo!
>> Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí 
>> tu cuenta ya! - http://correo.yahoo.com.ar
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-python
>>
>>   
>
>





More information about the Bf-python mailing list