[Bf-python] NMesh.Get() Missing?

Campbell J Barton cbarton at metavr.com
Sun Nov 14 07:40:16 CET 2004


For my purposes All I need is an ibject method.

We have-
obj.getData()
obj.getType()

A usefull function would be

obj.getDataName()

Since this would work for all data types and then this would be usefull 
in many situateion- Notjust for meshs. And also, it sidesteps the issue 
of there being an inconsistancy where NMesh.Get() returning names would 
be unlike Image.Get - Etc.

nmeshNames = []
for obj in Object.GetSelected():
    if obj.getType() == "Mesh":
       name = obj.getDataName()
       if name not in nmeshNames:
          nmeshNames.append(name)

Its still not so nice since it dosent give a list of nmesh names buyt I 
think its better then having to expose the data of many objects when all 
you need is the name.




Yann Vernier wrote:

>On Sat, Nov 13, 2004 at 01:17:45PM +0100, jms wrote:
>  
>
>>For the moment the empty GetRaw() returns a "new"  Mesh not the list of 
>>the meshes.
>>It works like the NMesh.New() function.
>>    
>>
>
>Thanks for the reminder, I had forgotten that. Yet another bit of
>inconsistent interfaces.. oddly enough, we also have a
>Blender.Library.Datablocks() call that does this sort of thing. Might
>make sense to make a Blender.Datablocks() call that would do the same
>for the current Blender file rather than the linked Library, or
>something like that?
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20041114/00e7c813/attachment.html>


More information about the Bf-python mailing list