[Bf-committers] Py/RNA API property class names.

Campbell Barton ideasman42 at gmail.com
Tue Feb 15 09:08:34 CET 2011

Hi Brecht, (& mailing list)

While documenting the API yesterday I found one thing Id like to
change. talked with Nathan and he thinks its OK but like me, isn't
sure of names.

- bpy.types.IDPropertyGroup, should have a more general name since its
used for all properties (IDProperty name is a hangover from C and
originally being used for ID's, now its used for keymaps, operators,
custom RNA, bone properties etc).
- bpy.props.PointerProperty(), name Pointer is not pythonic or
correct, would also be nice if name had some relation to
IDPropertyGroup which it takes as its main argument.

I'm not all that fussed about exact names but think whats currently
there is misleading.

Problem is that 'Property' name is already taken we have:
- bpy.types.Property (used for RNA Properties)
- bpy.types.IDProperty (dont know anywhere this is used?, guess it
would be used if python didn't coerce IDProperties into native types)
- bpy.types.IDPropertyGroup()
- bpy.props.PointerProperty() (defines new properties based on a
subclass of bpy.types.IDPropertyGroup)

Suggested names:
... a little longer but more descriptive, Could replace 'Custom' with
'Dynamic' or 'User'
- bpy.types.IDProperty -> CustomProperty
- bpy.types.IDPropertyGroup -> bpy.types.CustomPropertyGroup
- bpy.props.PointerProperty -> bpy.props.CustomProperty

- Campbell

More information about the Bf-committers mailing list