[Bf-python] Vertex Influence for no-armatured objs

Stephen Swaney sswaney at swbell.net
Mon Sep 8 04:28:30 CEST 2003


models at paposo.com wrote:
> [snip]
>   Maybe when you link an object to a datablock you
> could create a type-specific object.
> Something like:
> myMeshObject = GenericObject.link(MeshData)
> [snip]
> And i think that this problem will come back too, because there are alot of
> things objects can do in blender that are item specifc.  I think mesh is
> only the first place that the problem has been encountered.
> 
> 

I'm not sure I understand the solution being proposed here.  But I do
understand the problem.

Object.link() merely links an Object and a DataBlock together.  It
doesn't 
provide a place to put extended data.

The problem here is where to put some mesh specific data, namely vertex
groups.  As someone ( Willian? ) mentioned, we can't stick it in the
Mesh DataBlock because that can be shared between multiple Object
instances.
It really belongs to the Object, but at the moment we only have a single
pointer to a DataBlock.

It would be wrong to add a vertex group link to Object since not
everyone
( Camera Objects, for example ) don't have vertex groups.  Sounds to me
like we need an extra data pointer in Object.  It would point to type
specific data depending on the object type.  We could cleverly call it
'data2'.

In OO terms, we are subclassing Object.  It is easier to express in an
actual OO language, but that doesn't mean we can't implement it in C.

-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list