[Bf-committers] RNA Rename Proposal

Campbell Barton ideasman42 at gmail.com
Sat Aug 21 08:00:48 CEST 2010


Update on rna renaming, this is pretty much finished.

Heres a list of all API names, please check for
correctness/consistency since we better not make many changes after
this.

http://wiki.blender.org/index.php/User:Ideasman42/rna_rename

there a handful I left out, comments in-line.

 + * Context.manager -> wm:   pointer,  "(read-only)"
we have bpy.ops.wm but call this the 'manager' which is a bit strange,
since this name is used a lot internally should check with Ton before
renaming.

 + * Event.alt -> is_pressed_alt:   boolean,  "(read-only)    True
when the Alt/Option key is held"
 + * Event.oskey -> is_pressed_cmd:   boolean,  "(read-only)    True
when the Cmd key is held"
 + * Event.ctrl -> is_pressed_ctrl:   boolean,  "(read-only)    True
when the Ctrl key is held"
 + * Event.shift -> is_pressed_shift:   boolean,  "(read-only)    True
when the Shift key is held"
 + * KeyMapItem.alt -> pressed_alt:   boolean  "Alt key pressed"
 + * KeyMapItem.any -> pressed_any:   boolean  "Any modifier keys pressed"
 + * KeyMapItem.ctrl -> pressed_ctrl:   boolean  "Control key pressed"
 + * KeyMapItem.oskey -> pressed_oskey:   boolean  "Operating system
key pressed"
 + * KeyMapItem.shift -> pressed_shift:   boolean  "Shift key pressed"
While mostly I favor naming consistency, with events this is really no
chance for confusion.
"if event.ctrl" reads well and wont conflict with other properties.
So in this case I'd rather make an exception.

 + * Main.debug -> show_debug:   boolean  "Print debugging information
in console"
This is a general debugging flag and isn't only used for printing
debug info, would rather leave as is.

 + * Panel.bl_default_closed -> bl_use_closed:   boolean  "Defines if
the panel has to be open or collapsed at the time of its creation.
Note that once the panel has been created with bl_default_closed =
True, at reload (F8) it stays open."
Would rather turn this into an enum flag like we have with operators.
 bl_options = {'CLOSED'}

 + * UILayout.active -> show_active:   boolean  "NO DESCRIPTION"
 + * UILayout.enabled -> show_enabled:   boolean  "When false, this
(sub)layout is greyed out."
There's a lot of changes to make here and am considering changing
these to have them arguments rather then attributes (need to discuss
first).
--
- Campbell

On Tue, Aug 17, 2010 at 11:46 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
> Thanks for the feedback,
> Updated SVN and the wiki (which is only for display)
> http://wiki.blender.org/index.php/User:Ideasman42/rna_rename
>
> - distance_3d_rest, neXyon asked to keep the word reference reference
> - removed total from ColorRamp
> - from looking at the code it seems this is a scale: real_world_size
> -> simulation_scale
> - ok to use roughness and hardness
> - render_detail, viewport_detail -> render_resolution, resolution
> - other changes made as you suggested.
>
> On Tue, Aug 17, 2010 at 8:33 PM, Brecht Van Lommel <brecht at blender.org> wrote:
>> Hi Campbell,
>>
>> Thanks for doing this tedious work. I read over the list, noticed these.
>>
>> Brecht.
>>
>>
>> Actuator|SoundActuator.max_distance_3d -> distance_3d_max:   float
>> "The maximum distance at which you can hear the sound"
>> Actuator|SoundActuator.reference_distance_3d -> distance_rest_3d:
>> float  "The distance where the sound has a gain of 1.0"
>>
>>    I would use distance_3d_rest for consistency with distance_3d_max.
>>
>> ColorRamp.total -> count:   int,  "(read-only)    Total number of elements"
>>
>>    Property should be removed, can use len(ramp.elements).
>>
>> FluidSettings|DomainFluidSettings.real_world_size -> size_worldspace:
>>  float  "Size of the simulation domain in metres"
>>
>>    Don't think this new name is right, looks light some scale factor
>> for physical units?
>>
>> ID|Material.roughness -> rough:   float  "Oren-Nayar Roughness"
>> ID|Material.specular_hardness -> specular_hard:   int  "NO DESCRIPTION"
>> TextureSlot|MaterialTextureSlot.hardness_factor -> hard_factor:
>> float  "Amount texture affects hardness"
>>
>>    Would not change these names, "roughness" is a standard name, but
>> perhaps a matter of preference.
>>
>> ID|MetaBall.render_size -> render_detail:   float  "Polygonization
>> resolution in rendering"
>> ID|MetaBall.wire_size -> viewport_detail:   float  "Polygonization
>> resolution in the 3D viewport"
>>
>>    Would use "resolution" instead of "detail".
>>
>>  ID|ParticleSettings.ren_as -> render_method:   enum  "How particles
>> are rendered"
>>
>>    Would use "type" instead of "method" here.
>>
>> ID|Texture|CloudsTexture.stype -> subtype:   enum  "NO DESCRIPTION"
>> ID|Texture|MarbleTexture.stype -> subtype:   enum  "NO DESCRIPTION"
>> ID|Texture|StucciTexture.stype -> subtype:   enum  "NO DESCRIPTION"
>> ID|Texture|VoronoiTexture.coloring -> color_mode:   enum  "NO DESCRIPTION"
>> ID|Texture|WoodTexture.stype -> subtype:   enum  "NO DESCRIPTION"
>>
>>    Would use "color_type", "marble_type", "stucci_type",
>> "voronoi_type" and "wood_type".
>>
>> PointDensity.vertices_cache -> vertex_cache_coords:   enum
>> "Co-ordinate system to cache vertices in"
>> PointDensity.particle_cache -> particle_cache_coords:   enum
>> "Co-ordinate system to cache particles in"
>>
>>    Would use "space" instead of "coords"
>>
>> MaterialVolume.lighting_mode -> light_mode:   enum  "Method of
>> shading, attenuating, and scattering light through the volume"
>>
>>    Would use "method" instead of "mode".
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>
>
>
> --
> - Campbell
>


More information about the Bf-committers mailing list