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:
@@ -47,10 +47,10 @@ class DATA_PT_context_metaball(DataButtonsPanel):
|
||||
split = layout.split(percentage=0.65)
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
split.separator()
|
||||
elif mball:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
split.separator()
|
||||
else:
|
||||
if ob:
|
||||
layout.template_ID(ob, "data")
|
||||
@@ -70,21 +70,21 @@ class DATA_PT_metaball(DataButtonsPanel):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="Resolution:")
|
||||
col.label(text="Resolution:")
|
||||
sub = col.column(align=True)
|
||||
sub.itemR(mball, "wire_size", text="View")
|
||||
sub.itemR(mball, "render_size", text="Render")
|
||||
sub.prop(mball, "wire_size", text="View")
|
||||
sub.prop(mball, "render_size", text="Render")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Settings:")
|
||||
col.itemR(mball, "threshold", text="Threshold")
|
||||
col.label(text="Settings:")
|
||||
col.prop(mball, "threshold", text="Threshold")
|
||||
|
||||
layout.itemL(text="Update:")
|
||||
layout.label(text="Update:")
|
||||
if wide_ui:
|
||||
layout.itemR(mball, "flag", expand=True)
|
||||
layout.prop(mball, "flag", expand=True)
|
||||
else:
|
||||
layout.itemR(mball, "flag", text="")
|
||||
layout.prop(mball, "flag", text="")
|
||||
|
||||
|
||||
class DATA_PT_metaball_element(DataButtonsPanel):
|
||||
@@ -100,35 +100,35 @@ class DATA_PT_metaball_element(DataButtonsPanel):
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if wide_ui:
|
||||
layout.itemR(metaelem, "type")
|
||||
layout.prop(metaelem, "type")
|
||||
else:
|
||||
layout.itemR(metaelem, "type", text="")
|
||||
layout.prop(metaelem, "type", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Settings:")
|
||||
col.itemR(metaelem, "stiffness", text="Stiffness")
|
||||
col.itemR(metaelem, "negative", text="Negative")
|
||||
col.itemR(metaelem, "hide", text="Hide")
|
||||
col.label(text="Settings:")
|
||||
col.prop(metaelem, "stiffness", text="Stiffness")
|
||||
col.prop(metaelem, "negative", text="Negative")
|
||||
col.prop(metaelem, "hide", text="Hide")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column(align=True)
|
||||
|
||||
if metaelem.type in ('CUBE', 'ELLIPSOID'):
|
||||
col.itemL(text="Size:")
|
||||
col.itemR(metaelem, "size_x", text="X")
|
||||
col.itemR(metaelem, "size_y", text="Y")
|
||||
col.itemR(metaelem, "size_z", text="Z")
|
||||
col.label(text="Size:")
|
||||
col.prop(metaelem, "size_x", text="X")
|
||||
col.prop(metaelem, "size_y", text="Y")
|
||||
col.prop(metaelem, "size_z", text="Z")
|
||||
|
||||
elif metaelem.type == 'TUBE':
|
||||
col.itemL(text="Size:")
|
||||
col.itemR(metaelem, "size_x", text="X")
|
||||
col.label(text="Size:")
|
||||
col.prop(metaelem, "size_x", text="X")
|
||||
|
||||
elif metaelem.type == 'PLANE':
|
||||
col.itemL(text="Size:")
|
||||
col.itemR(metaelem, "size_x", text="X")
|
||||
col.itemR(metaelem, "size_y", text="Y")
|
||||
col.label(text="Size:")
|
||||
col.prop(metaelem, "size_x", text="X")
|
||||
col.prop(metaelem, "size_y", text="Y")
|
||||
|
||||
bpy.types.register(DATA_PT_context_metaball)
|
||||
bpy.types.register(DATA_PT_metaball)
|
||||
|
Reference in New Issue
Block a user