[Bf-python] NLA addition needs thoughts

Campbell Barton cbarton at metavr.com
Thu Aug 31 15:23:27 CEST 2006


Roland Hess wrote:
> Right now, the NLA API for stride bone uses the GUI convention of 
> dealing with strings. In the NLA n-key panel, you type the name of the 
> bone you want in the StrideBone field, and Blender links it up for you 
> behind the scenes. The PyAPI seems to have been written to mirror the 
> user's GUI experience.
>
> I was adding get/setters for group targets in NLA strips (used to 
> target specific armatures with dupligroups with NLA, and are essential 
> for animating instanced groups seperately), and my original code had 
> used the same methodology: strings, like the GUI. It was pointed out 
> on irc that perhaps just passing and retrieving the actual object it 
> was linking to instead of its name would make more sense.
>
> My thought is that where possible, the PyAPI should mirror the user 
> experience, unless the user experience is hacky. In an ideal 
> application, the user would be able to set the stride bone via a 
> drop-down menu with all valid bone possibilities, and to set the 
> groupTarget via a drop-down with available, valid armatures.
>
> Maybe we should go back and change the StrideBone API to accept and 
> return bone objects, as opposed to strings, and I'll make the 
> groupTarget API follow suite. (If you're worried about 
> backwards compatibility with the StrideBone API, I'm willing to bet 
> cash that the number of users getting and setting stride bone in 
> python right now == 0).
>
> Thoughts?
>
> Roland Hess
> harkyman
Abt mirroring the users experience
Dont think this applys here. - Blenders PyAPI  isnt realy that much like 
the users experience, in that its not a macro like API where many 
functions are directly related to a user command.

ob.parent, group.objects, both use python objects in the API. but have 
text input in the UI.
In my opinnie, keeping consistany with the rest of Blenders API is more 
important in this case. do many other areas of blender

this is a very small cryt.
dont let it put you off from makling these valuable contributions. :-)

-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list