[Bf-python] new python development path

Willian Padovani Germano wgermano at superig.com.br
Thu Feb 9 19:49:25 CET 2006


Hi Joseph,

Gilbert, Joseph T. wrote:
> I agree that this poses serious issues and potential problems. 
> 
> The current idea being floated is that you would obtain unlinked data as
> a list of names from a module level method such as Module.GetUnlinked().
> You would use these names to link this data to an object.

This only for obdata (ob->data), not all structs with ID's.

The main issues that I'm aware about accessing obdata are two:

- some operations on ob data may actually change stuff in one of its 
owner objects and we need to know which one to be able to edit it;

- dag updates: changes to ob data must be informed so that all objects 
linked to that data can be update (I haven't investigate properly here yet).

The simple and usually sensible way to decide what kind of access we can 
give is to follow Blender itself. Via UI you can't edit a mesh unless 
it's linked to at least one object. And you access that mesh by making 
one of its owner objects active. In BPy this means:

ob = Object.Get("abc")
mesh = ob.data
# now you're free to edit mesh

For actions, etc. we should consider what Blender itself allows via UI, 
what script writers need and if having direct access could be 
problematic or not. No need to force a general solution on obdata and 
other stuff, that's the point.

Antont, Joe (joeedh): ok, bad use of the word "dict", sorry, a custom 
type, yes, that's what I meant.

--
Willian



More information about the Bf-python mailing list