[Bf-python] RE: action / NLA api

Ed Blake kitsune_e at yahoo.com
Tue Nov 15 19:23:12 CET 2005


I'm not knowledgeable about the implementation but I've been thinking about
how I would like to use NLA strips.  The following is a users perspective on
how I would expect to access NLA strips.

Like most of the api NLA is two things, a module providing methods to get
strip objects, and an object class providing an interface to the properties
and abilities of the strips.  From the outside NLA strips seem to me to be
primarily a collection of actions.  The actions form a sparse 1d matrix of
time:action pairs, so a dict.  The rest of the attributes/methods of a strip
revolve around positioning the actions in time, scaling the intervals between
actions, and adjusting the magnitude of the actions over time.  Lastly strips
and actions belong to objects, so objects have to give access to the strip
instances they are using.

Anyway:

walk = NLA.New(DictOfTimeActionPairs) # how to get existing strips?
walk.start = 5 # new start (move or scale?)
walk.end = 30 # new end
print walk.scale # 1.0 = 100%, 2.5 = 250%, etc.
walk2 = walk.copy() # get a new instance (shift-d)
walk2.move(25) # should be absolute time value of strip start
walk.leadout = 5 # in frames
walk2.leadin = 5 # may have curve type in future?
myObj.strips.extend([walk, walk2]) #should be a dict? set?
# list comprehensions can filter/modify an objects strips list:
[myObj.strips.remove(strip) for strip in myObj.strips if 'run' in
strip.name.lower()]


--- Toni Alatalo <antont at kyperjokki.fi> wrote:

> On Tuesday 15 November 2005 13:24, Toni Alatalo wrote:
> > move Blender.Armature.NLA to Blender.NLA, but *also* have a separate
> > Blender.Action module/type. rationale below .. i guess i should draft
> this
> 
> looked at this a bit with Ton, and he confirmed that actions make sense to
> be 
> like that - they are generic 'ipo bags', that exist globally by themselves.
> 
> was planning to proceed with the NLA to get strips, 'cause thought that i
> need 
> to create strips for the generated animations (using pre-made actions) for 
> the secondary movements in the movie, but now learned that actually dont
> need 
> them: poses are properties of Object, and i can just use them for the 
> animation control. 
> 
> so am in no hurry with NLA/strip functionality anymore, but would add
> Action 
> to get actions, and then add Object.pose and new Pose type with a method
> like 
> pose.fromAction(action, frame, factor)
> 
> am open to comments of course, and do still think that those other changes 
> should be done too before we freeze the api for release..
> 
> ~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