split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif arm:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if arm:
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif arm:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if cam:
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif curve:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if curve:
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif lamp:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
layout.itemS()
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif lat:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if lat:
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif mesh:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if mesh:
split = layout.split(percentage=0.65)
if ob:
- split.template_ID(context, ob, "data")
+ split.template_ID(ob, "data")
split.itemS()
elif curve:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if curve:
split = layout.split(percentage=0.65)
if ob and slot:
- split.template_ID(context, slot, "material", new="MATERIAL_OT_new")
+ split.template_ID(slot, "material", new="MATERIAL_OT_new")
split.itemR(ob, "active_material_index", text="Active")
elif mat:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if mat:
split = layout.split(percentage=0.65)
if psys:
- split.template_ID(context, psys, "settings")
+ split.template_ID(psys, "settings")
if psys:
#row = layout.row()
if ma or la or wo:
if slot:
- split.template_ID(context, slot, "texture", new="TEXTURE_OT_new")
+ split.template_ID(slot, "texture", new="TEXTURE_OT_new")
else:
split.itemS()
elif wo:
split.itemR(wo, "active_texture_index", text="Active")
elif tex:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
layout.itemS()
split = layout.split(percentage=0.65)
if scene:
- split.template_ID(context, scene, "world", new="WORLD_OT_new")
+ split.template_ID(scene, "world", new="WORLD_OT_new")
elif world:
- split.template_ID(context, space, "pin_id")
+ split.template_ID(space, "pin_id")
split.itemS()
if context.area.show_menus:
row = layout.row(align=True)
- row.itemM(context, "Buttons_MT_view", text="View")
+ row.itemM("Buttons_MT_view", text="View")
row = layout.row()
row.itemR(so, "buttons_context", expand=True, text="")
col.itemR(so, "panel_alignment", expand=True)
bpy.types.register(Buttons_HT_header)
-bpy.types.register(Buttons_MT_view)
\ No newline at end of file
+bpy.types.register(Buttons_MT_view)
layout.itemS()
- layout.itemM(context, "IMAGE_MT_uvs_transform")
- layout.itemM(context, "IMAGE_MT_uvs_mirror")
- layout.itemM(context, "IMAGE_MT_uvs_weldalign")
+ layout.itemM("IMAGE_MT_uvs_transform")
+ layout.itemM("IMAGE_MT_uvs_mirror")
+ layout.itemM("IMAGE_MT_uvs_weldalign")
layout.itemS()
layout.itemS()
- layout.itemM(context, "IMAGE_MT_uvs_showhide")
+ layout.itemM("IMAGE_MT_uvs_showhide")
class IMAGE_HT_header(bpy.types.Header):
__space_type__ = "IMAGE_EDITOR"
show_paint = sima.show_paint
show_uvedit = sima.show_uvedit
- layout.template_header(context)
+ layout.template_header()
# menus
if context.area.show_menus:
row = layout.row()
- row.itemM(context, "IMAGE_MT_view")
+ row.itemM("IMAGE_MT_view")
if show_uvedit:
- row.itemM(context, "IMAGE_MT_select")
+ row.itemM("IMAGE_MT_select")
# XXX menuname= (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))? "Image*": "Image";
- row.itemM(context, "IMAGE_MT_image")
+ row.itemM("IMAGE_MT_image")
if show_uvedit:
- row.itemM(context, "IMAGE_MT_uvs")
+ row.itemM("IMAGE_MT_uvs")
- layout.template_ID(context, sima, "image", new="IMAGE_OT_new", open="IMAGE_OT_open")
+ layout.template_ID(sima, "image", new="IMAGE_OT_new", open="IMAGE_OT_open")
"""
/* image select */
layout.itemS()
- layout.itemM(context, "IMAGE_MT_uvs_transform")
- layout.itemM(context, "IMAGE_MT_uvs_mirror")
- layout.itemM(context, "IMAGE_MT_uvs_weldalign")
+ layout.itemM("IMAGE_MT_uvs_transform")
+ layout.itemM("IMAGE_MT_uvs_mirror")
+ layout.itemM("IMAGE_MT_uvs_weldalign")
layout.itemS()
layout.itemS()
- layout.itemM(context, "IMAGE_MT_uvs_showhide")
+ layout.itemM("IMAGE_MT_uvs_showhide")
class IMAGE_HT_header(bpy.types.Header):
__space_type__ = "IMAGE_EDITOR"
show_paint = sima.show_paint
show_uvedit = sima.show_uvedit
- layout.template_header(context)
+ layout.template_header()
# menus
if context.area.show_menus:
row = layout.row()
- row.itemM(context, "IMAGE_MT_view")
+ row.itemM("IMAGE_MT_view")
if show_uvedit:
- row.itemM(context, "IMAGE_MT_select")
+ row.itemM("IMAGE_MT_select")
# XXX menuname= (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))? "Image*": "Image";
- row.itemM(context, "IMAGE_MT_image")
+ row.itemM("IMAGE_MT_image")
if show_uvedit:
- row.itemM(context, "IMAGE_MT_uvs")
+ row.itemM("IMAGE_MT_uvs")
- layout.template_ID(context, sima, "image", new="IMAGE_OT_new", open="IMAGE_OT_open")
+ layout.template_ID(sima, "image", new="IMAGE_OT_new", open="IMAGE_OT_open")
"""
/* image select */
sce = context.scene
layout = self.layout
- layout.template_header(context)
+ layout.template_header()
if context.area.show_menus:
row = layout.row(align=True)
- row.itemM(context, "OUTLINER_MT_view")
+ row.itemM("OUTLINER_MT_view")
row = layout.row()
row.itemR(so, "display_mode", text="")
st = context.space_data
layout = self.layout
- layout.template_header(context)
+ layout.template_header()
if context.area.show_menus:
row = layout.row()
- row.itemM(context, "SEQUENCER_MT_view")
+ row.itemM("SEQUENCER_MT_view")
row.itemR(st, "display_mode")
layout.itemS()
if st.display_mode == 'SEQUENCER':
- row.itemM(context, "SEQUENCER_MT_select")
- row.itemM(context, "SEQUENCER_MT_marker")
- row.itemM(context, "SEQUENCER_MT_add")
- row.itemM(context, "SEQUENCER_MT_strip")
+ row.itemM("SEQUENCER_MT_select")
+ row.itemM("SEQUENCER_MT_marker")
+ row.itemM("SEQUENCER_MT_add")
+ row.itemM("SEQUENCER_MT_strip")
layout.itemS()
row.itemO("SEQUENCER_OT_reload")
else:
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Sound (Ram)")
layout.item_booleanO("SEQUENCER_OT_sound_strip_add", "hd", True, text="Sound (Streaming)") # FFMPEG ONLY
- layout.itemM(context, "SEQUENCER_MT_add_effect")
+ layout.itemM("SEQUENCER_MT_add_effect")
class SEQUENCER_MT_add_effect(bpy.types.Menu):
text = st.text
layout = self.layout
- layout.template_header(context)
+ layout.template_header()
if context.area.show_menus:
row = layout.row()
- row.itemM(context, "TEXT_MT_text")
+ row.itemM("TEXT_MT_text")
if text:
- row.itemM(context, "TEXT_MT_edit")
- row.itemM(context, "TEXT_MT_format")
+ row.itemM("TEXT_MT_edit")
+ row.itemM("TEXT_MT_format")
if text and text.modified:
row = layout.row()
row.itemR(st, "word_wrap", text="")
row.itemR(st, "syntax_highlight", text="")
- layout.template_ID(context, st, "text", new="TEXT_OT_new", open="TEXT_OT_open", unlink="TEXT_OT_unlink")
+ layout.template_ID(st, "text", new="TEXT_OT_new", open="TEXT_OT_open", unlink="TEXT_OT_unlink")
if text:
row = layout.row()
layout.itemS()
- layout.itemM(context, "TEXT_MT_edit_view")
- layout.itemM(context, "TEXT_MT_edit_select")
- layout.itemM(context, "TEXT_MT_edit_markers")
+ layout.itemM("TEXT_MT_edit_view")
+ layout.itemM("TEXT_MT_edit_select")
+ layout.itemM("TEXT_MT_edit_markers")
layout.itemS()
layout.itemS()
- layout.itemM(context, "TEXT_MT_edit_to3d")
+ layout.itemM("TEXT_MT_edit_to3d")
bpy.types.register(TEXT_HT_header)
bpy.types.register(TEXT_PT_properties)
api_ui_item_common(func);
func= RNA_def_function(srna, "itemM", "uiItemM");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_common(func);
parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu.");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* templates */
func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func= RNA_def_function(srna, "template_ID", "uiTemplateID");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a new ID block.");