rna UI api rename...

note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long.

itemR() --> prop()
items_enumR() --> props_enum()
item_menu_enumR() --> prop_menu_enum()
item_pointerR() --> prop_pointer()
itemO() --> operator()
item_enumO() --> operator_enum()
items_enumO() --> operator_enums()
item_menu_enumO() --> operator_menu_enum()
item_booleanO() --> operator_boolean()
item_intO() --> operator_int()
item_floatO() --> operator_float()
item_stringO() --> operator_string()
itemL() --> label()
itemM() --> menu()
itemS() --> separator()

batch script used http://www.pasteall.org/9345
This commit is contained in:
Campbell Barton
2009-11-23 00:27:30 +00:00
parent 6555eca6fe
commit caab05ec8c
57 changed files with 4603 additions and 4603 deletions

View File

@@ -75,7 +75,7 @@ def draw(layout, context, context_member, use_edit = True):
if use_edit:
row = layout.row()
props = row.itemO("wm.properties_add", properties=True, text="Add")
props = row.operator("wm.properties_add", properties=True, text="Add")
props.path = context_member
del row
@@ -102,20 +102,20 @@ def draw(layout, context, context_member, use_edit = True):
else:
row = box.row()
row.itemL(text=key)
row.label(text=key)
# explicit exception for arrays
if convert_to_pyobject and not hasattr(val_orig, "len"):
row.itemL(text=val_draw)
row.label(text=val_draw)
else:
row.itemR(rna_item, '["%s"]' % key, text="")
row.prop(rna_item, '["%s"]' % key, text="")
if use_edit:
row = split.row(align=True)
prop = row.itemO("wm.properties_edit", properties=True, text="edit")
prop = row.operator("wm.properties_edit", properties=True, text="edit")
assign_props(prop, val_draw, key)
prop = row.itemO("wm.properties_remove", properties=True, text="", icon='ICON_ZOOMOUT')
prop = row.operator("wm.properties_remove", properties=True, text="", icon='ICON_ZOOMOUT')
assign_props(prop, val_draw, key)