[Bf-python] new python development path

Gilbert, Joseph T. jgilbert at tigr.ORG
Thu Feb 9 21:00:58 CET 2006


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.

copyPoseFromAction and other object+data specific methods would go into
their appropriate type rather than in the generic object class. 

getActions() would return a list of names - not a list of Action python
wrappers. You would use the name in Object.setAction('action_name')

Anyway this is the idea at least.

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Toni
Alatalo
Sent: Thursday, February 09, 2006 2:40 PM
To: Blender Foundation Python list
Subject: Re: [Bf-python] new python development path

On Thursday 09 February 2006 20:12, Gilbert, Joseph T. wrote:
> Currently we wrap unlinked data as python objects. The 'new' model
that
> Willian is talking about will only wrap Object+data objects. Unlinked
> data cannot be modified or accessed.

but in Blender there are not only Objects, such as Armature, but also
other 
datablocks, such as Actions and IPOs, that i would simply put to e.g. 
Blender.actions and Blender.ipos etc.

> Having a dictionary'esqe method of wrapping G.main supposes that we
are
> giving access to datablocks; which in the 'new' model we are not.

how do you get unlinked actions, then? what happens to 
Blender.Armature.NLA.GetActions() which is that the dictionary'esque
method 
now? (thanks to you of course :)

even tougher than Action: how would you get a Text datablock? they have
no 
relation to objects (except objects can have scriptlinks, but that is
not 
relevant to this)

oh crap, there seems to be no limit to my stupidity: the point is:

> >> sourcearm = Blender.armatures['armature']

[in  1] type(sourcearm)
[out 1] <Blender ArmatureObject "armature">
[in  2] type(sourcearm.data)
[out 2] <Blender ArmatureData "armaturedata">

..so this example was thinking in terms of the object level access,
which has 
Blender.Armature() but no Blender.ArmatureData(), and Blender.Armature 
objects have methods like copyPoseFromAction etc. that there is now in 
Blender.Object (which would become an abstract baseclass in that model,
as we 
talked) 

just babbling,
~Toni
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list