Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_node.py
| Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | |||||
| class NODE_MT_add(bpy.types.Menu): | class NODE_MT_add(bpy.types.Menu): | ||||
| bl_space_type = 'NODE_EDITOR' | bl_space_type = 'NODE_EDITOR' | ||||
| bl_label = "Add" | bl_label = "Add" | ||||
| bl_translation_context = i18n_contexts.operator_default | bl_translation_context = i18n_contexts.operator_default | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
JacquesLucke: Incorrect whitespace. | |||||
| layout.operator_context = 'INVOKE_DEFAULT' | layout.operator_context = 'INVOKE_DEFAULT' | ||||
| if nodeitems_utils.has_node_categories(context): | |||||
| props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM') | props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM') | ||||
| props.use_transform = True | props.use_transform = True | ||||
| layout.separator() | layout.separator() | ||||
| # actual node submenus are defined by draw functions from node categories | # actual node submenus are defined by draw functions from node categories | ||||
| nodeitems_utils.draw_node_categories_menu(self, context) | nodeitems_utils.draw_node_categories_menu(self, context) | ||||
| class NODE_MT_view(Menu): | class NODE_MT_view(Menu): | ||||
| bl_label = "View" | bl_label = "View" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 517 Lines • Show Last 20 Lines | |||||
Incorrect whitespace.