diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_node.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 24e8d2e4a53..4cc72f1dc4b 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -19,6 +19,12 @@ # <pep8 compliant> import bpy from bpy.types import Header, Menu, Panel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDrawingToolsPanel, + GreasePencilStrokeEditPanel, + GreasePencilDataPanel, + GreasePencilToolsPanel, + ) class NODE_HT_header(Header): @@ -180,7 +186,8 @@ class NODE_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class NODE_MT_select(Menu): @@ -438,6 +445,45 @@ class NODE_UL_interface_sockets(bpy.types.UIList): layout.template_node_socket(color) +# Grease Pencil properties +class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + @classmethod + def poll(cls, context): + snode = context.space_data + return snode is not None and snode.node_tree is not None + + +class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + bl_options = {'DEFAULT_CLOSED'} + + # NOTE: this is just a wrapper around the generic GP tools panel + # It contains access to some essential tools usually found only in + # toolbar, but which may not necessarily be open + + +# Tool Shelf ------------------ + + +# Grease Pencil drawing tools +class NODE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + + +# Grease Pencil stroke editing tools +class NODE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + +# ----------------------------- + def node_draw_tree_view(layout, context): pass |