本文整理汇总了Python中bpy.types.UIList方法的典型用法代码示例。如果您正苦于以下问题:Python types.UIList方法的具体用法?Python types.UIList怎么用?Python types.UIList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bpy.types
的用法示例。
在下文中一共展示了types.UIList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw
# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import UIList [as 别名]
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
wrd = bpy.data.worlds['Arm']
row = layout.row(align=True)
row.alignment = 'EXPAND'
row.operator("arm.build_project")
# row.operator("arm.patch_project")
row.operator("arm.publish_project", icon="EXPORT")
row.enabled = wrd.arm_exporterlist_index >= 0 and len(wrd.arm_exporterlist) > 0
rows = 2
if len(wrd.arm_exporterlist) > 1:
rows = 4
row = layout.row()
row.template_list("ARM_UL_ExporterList", "The_List", wrd, "arm_exporterlist", wrd, "arm_exporterlist_index", rows=rows)
col = row.column(align=True)
col.operator("arm_exporterlist.new_item", icon='ADD', text="")
col.operator("arm_exporterlist.delete_item", icon='REMOVE', text="")
col.menu("ARM_MT_ExporterListSpecials", icon='DOWNARROW_HLT', text="")
if len(wrd.arm_exporterlist) > 1:
col.separator()
op = col.operator("arm_exporterlist.move_item", icon='TRIA_UP', text="")
op.direction = 'UP'
op = col.operator("arm_exporterlist.move_item", icon='TRIA_DOWN', text="")
op.direction = 'DOWN'
if wrd.arm_exporterlist_index >= 0 and len(wrd.arm_exporterlist) > 0:
item = wrd.arm_exporterlist[wrd.arm_exporterlist_index]
box = layout.box().column()
box.prop(item, 'arm_project_target')
if item.arm_project_target == 'custom':
box.prop(item, 'arm_project_khamake')
box.prop(item, arm.utils.target_to_gapi(item.arm_project_target))
wrd.arm_rpcache_list.clear() # Make UIList work with prop_search()
for i in wrd.arm_rplist:
wrd.arm_rpcache_list.add().name = i.name
box.prop_search(item, "arm_project_rp", wrd, "arm_rpcache_list", text="Render Path")
box.prop_search(item, 'arm_project_scene', bpy.data, 'scenes', text='Scene')
layout.separator()
col = layout.column()
col.prop(wrd, 'arm_project_name')
col.prop(wrd, 'arm_project_package')
col.prop(wrd, 'arm_project_version')
col.prop(wrd, 'arm_project_bundle')
col.prop(wrd, 'arm_project_icon')
col.prop(wrd, 'arm_dce')
col.prop(wrd, 'arm_compiler_inline')
col.prop(wrd, 'arm_minify_js')
col.prop(wrd, 'arm_optimize_data')
col.prop(wrd, 'arm_asset_compression')
col.prop(wrd, 'arm_single_data_file')