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)
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)
def draw(self, context): space_type = context.space_data.type if space_type == 'VIEW_3D': self.preset_subdir = "system_property_chart_view3d" else: self.preset_subdir = "system_property_chart_sequencer" Menu.draw_preset(self, context)
def draw(self, context): self.layout.operator("wm.appconfig_default", text="Blender (default)") # now draw the presets Menu.draw_preset(self, context)
def draw(self, context): layout = self.layout layout.emboss = 'PULLDOWN_MENU' layout.operator_context = 'EXEC_DEFAULT' Menu.draw_preset(self, context)
def draw(self, context): self.operator = context.space_data.operator.bl_idname Menu.draw_preset(self, context)
def draw(self, context): self.operator = context.active_operator.bl_idname Menu.draw_preset(self, context)
def setup_contants(): from bpy.types import Menu for cls in Menu.__subclasses__(): if cls.is_registered: bl_idname = getattr(cls, "bl_idname", cls.__name__) MENU_TYPE_MAP[bl_idname] = cls