[Bf-python] error with Mesh ?

Theo de Ridder theo.de.ridder at planet.nl
Mon Oct 22 15:53:38 CEST 2007


thanks a lot, once upon a time I have know it.

but the fact that NMesh is deprecated,
that obj.data results in a NMesh, and that you have
to do obj.getData(mesh=1) before calling a mesh method is
a piece of logic that does not fit my type of memory,
and one of the reasons that I once started to wrap everything
with metaclasses behind more consistent and pythonic types and  
attributes.

Theo

Ken hughes wrote:

> IIRC, vertex groups are stored in the object, not the mesh.  So you  
> need to first get the object, then use getData(mesh=1) to get the  
> mesh (with a link to the associated object):
>
> ob = B.Object.Get('Cube')
> mesh = ob.getData(mesh=1)
>
> Ken
>
> Theo de Ridder wrote:
>> is there something wrong in 2.45 ?
>>
>> just after start in a text window:
>>
>> 	import Blender as B
>> 	mesh = B.Mesh.Get('Cube')
>> 	print mesh.getVertGroupNames()
>>
>> alt-P results in error complaining that the mesh is not linked,
>> which clearly is not true as can be seen in the outliner,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20071022/92a82fe7/attachment.html>


More information about the Bf-python mailing list