[Bf-committers] RNA Rename Proposal
nathan at letworyinteractive.com
Mon Aug 16 23:08:35 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
On 16.8.2010 21:29, Campbell Barton wrote:
> Here is a list of RNA properties to rename edited by Brecht, Luca and
> myself (as mentioned last meeting).
> The lines which are colored have been changed from there original
> values, sorted by Class/attr.
> Of 4605 names 1471 have changed, I'll need to write up some docs so
> theres better guidelines for naming new RNA properties based on the
> changes made here.
I think in general it's going into the right direction. What I think I
sometimes miss is information encoded in property naming (further usage
of verbs and other denoters) that tells you what properties are
read-only, what not.
For instance in current default scene, add a twenty-frame animation of
default cube to location, then try in console
for frame in range(1, 21):
bpy.data.scenes.frame_current = frame
When instead using .set_frame(frame) you'll see location properly
update. Yes, documentation goes a long way, but it is rightfully
confusing for developers when looking at dir(sometype) output and
gleaning from there potential properties to use in scripts only to find
out it doesn't do what one expects it to do (disclaimer: this could be a
bug, dunno, but I'm using this as a handy illustratory example ;)
Point in case: it'd be nice to be able to see directly from API naming
what a property (and function, come to that) actually can do and cannot do.
Again, I think in general the proposal is on the right track, unifying
naming will go a long way in helping developers write scripts in a fast
way without having to constantly consult documentation.
Some slight inconsistancy:
In some places words are written fully (texture, vertex), other places
words are abbreviated as in code (co, verts). Can we instead have
everywhere the full versions? That way one doesn't have to guess when
something is abbreviated or not (thus increasing uniformity throughout API).
There. Feedback written.
> Tomorrow I'll start to go ahead and apply the naming changes for
> UserPrefs, Themes and SpaceTypes since they are unlikely to be
> controversial or break peoples scripts.
> In the meantime any developers who added RNA into blender could look
> at this list and make sure the names are ok.
Spotted a typo:
m|Itasc.dampmax -> dampimg_max.
make that damping_max.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Bf-committers