[Bf-committers] Final Design of Basics (render api)

Campbell Barton cbarton at metavr.com
Sat Jun 30 01:20:09 CEST 2007

Hi Aaron, good to see the bookmarking stuff has been worked out, I was 
worried it would be something which could get feature creep and end up 
being yet another property system.
but one TemporaryData per object should fine.

My last concern is naming conventions for functions, these are fairly 
easy to change but often end up being left as is. and from using the 
Blender/Python api, inconsistent names can make the api harder to use/ 
remember function names.

Could you have some kind of rationale behind the naming of functions?

get_objects_temporary_data - (why objects)

is_instanced - (could be is_instance)

My preference is to have function names prefix with the data they 
operate on, and end with the specific operations.

It has the advantage that when function names are sorted alphabetically 
they are grouped nicely, and easier to look up.

---------------------- could look like this...
get_first_vertex -> vertex_get_first
get_next_vertex -> vertex_get_next
vertex_exists (fits in)

get_camera_lens -> camera_get_lens

Rapi_object_exists -> (fits in)
Rapi_get_next_object -> Rapi_object_get_next  OR   Rapi_object_next

get_camera_lens -> camera_get_lens
get_clipping_start -> camera_get_clip_start
get_depth_of_field -> camera_get_dof

Of course you can rationalize some other convention.

More information about the Bf-committers mailing list