本文整理汇总了Python中bpy.types.Menu类的典型用法代码示例。如果您正苦于以下问题:Python Menu类的具体用法?Python Menu怎么用?Python Menu使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Menu类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw
def draw(self, context):
props = self.layout.operator("wm.context_set_value", text="Blender (default)")
props.data_path = "window_manager.keyconfigs.active"
props.value = "context.window_manager.keyconfigs.default"
# now draw the presets
Menu.draw_preset(self, context)
示例2: draw
def draw(self, context):
self.operator = context.active_operator.bl_idname
# dummy 'default' menu item
layout = self.layout
layout.operator("wm.operator_defaults")
layout.separator()
Menu.draw_preset(self, context)
示例3: draw
def draw(self, context):
self.operator = context.space_data.operator.bl_idname
Menu.draw_preset(self, context)
示例4: draw
def draw(self, context):
self.operator = context.active_operator.bl_idname
Menu.draw_preset(self, context)
示例5: draw
def draw(self, context):
layout = self.layout
layout.emboss = 'PULLDOWN_MENU'
layout.operator_context = 'EXEC_DEFAULT'
Menu.draw_preset(self, context)