[Bf-python] error with Mesh ?

Martin Poirier theeth at yahoo.com
Sun Oct 21 22:55:36 CEST 2007


That's exactly what's happening.

Since you went for the mesh directly, the API doesn't
know what object to use to get the vertex groups
(since the mesh could be linked to more than one
object).

Yes, it's a bit silly that it is object-level but
accessible in mesh.

Martin

--- Ken Hughes <khughes at pacific.edu> 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,
> >
> > Theo
> > p.s. my previous (long) message 15 minutes back
> seemed to be broken,
> > I can see just 1 line,
> > ???
> >
> >
> >
> > _______________________________________________
> > Bf-python mailing list
> > Bf-python at blender.org
> >
> http://lists.blender.org/mailman/listinfo/bf-python
> >
> >   
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Bf-python mailing list