[Bf-python] new python development path
Toni Alatalo
antont at kyperjokki.fi
Thu Feb 9 20:40:24 CET 2006
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
More information about the Bf-python
mailing list