[Bf-python] mesh.object
Campbell Barton
cbarton at metavr.com
Thu Feb 23 12:27:02 CET 2006
Martin Poirier wrote:
> --- Campbell Barton <cbarton at metavr.com> wrote:
>
>
>> Would it be possible to have an object property of
>> mesh?
>> Since some functions require a mesh be referenced to
>> an object it may be
>> good.
>>
>> say mesh.getInfluences(0) failes if the mesh is not
>> retrived from an
>> object, but there is no way to check this.
>> if we have mesh.object - None for new meshes and
>> meshes retrieved by
>> Mesh.Get('foobar') mesh.object == None.
>> for
>> me= ob.getData(mesh=1)
>> ob == me.object
>>
>> Any complaints?
>>
>
> Err, multi user meshes.
>
> Martin
>
This isn't meant to show what object uses a mesh. Rather the object that
is used by the mesh for getting bone influences.
Eg. Say a function uses. a mesh and needs vert influences. the only way
to check now is to try/except me.getInfluences(0) .
Better say,
if mesh.object:
infs= mesh.getInfluences(i)
--
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
More information about the Bf-python
mailing list