Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-17 03:58:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-17 05:48:51 +0300
commit7baddbf81807bc145efe61001da9f574df121965 (patch)
tree3aa38a26d5826e7e55bf49255cb37c9405df1ed7 /release/scripts/startup/bl_ui/space_node.py
parent2a9214eaaf04959590ff979451b98e49697264cc (diff)
UI: add tool panel for node editor, use tabs
This follows the 3D view, adding an "Options" tab.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_node.py')
-rw-r--r--release/scripts/startup/bl_ui/space_node.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 52a3a714cdc..45ff4ce6c5f 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -27,6 +27,9 @@ from .properties_grease_pencil_common import (
AnnotationDataPanel,
GreasePencilToolsPanel,
)
+from .space_toolsystem_common import (
+ ToolActivePanelHelper,
+)
from .properties_material import (
EEVEE_MATERIAL_PT_settings,
MATERIAL_PT_viewport
@@ -321,6 +324,12 @@ class NODE_MT_node(Menu):
layout.operator("node.read_viewlayers")
+class NODE_PT_active_tool(ToolActivePanelHelper, Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'UI'
+ bl_category = "Tool"
+
+
class NODE_PT_material_slots(Panel):
bl_space_type = "NODE_EDITOR"
bl_region_type = 'HEADER'
@@ -430,7 +439,7 @@ class NODE_MT_context_menu(Menu):
class NODE_PT_active_node_generic(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "Item"
bl_label = "Node"
@classmethod
@@ -448,7 +457,7 @@ class NODE_PT_active_node_generic(Panel):
class NODE_PT_active_node_color(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "Item"
bl_label = "Color"
bl_options = {'DEFAULT_CLOSED'}
bl_parent_id = 'NODE_PT_active_node_generic'
@@ -478,7 +487,7 @@ class NODE_PT_active_node_color(Panel):
class NODE_PT_active_node_properties(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "Item"
bl_label = "Properties"
bl_options = {'DEFAULT_CLOSED'}
bl_parent_id = 'NODE_PT_active_node_generic'
@@ -512,7 +521,7 @@ class NODE_PT_active_node_properties(Panel):
class NODE_PT_texture_mapping(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "Item"
bl_label = "Texture Mapping"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@@ -550,7 +559,7 @@ class NODE_PT_texture_mapping(Panel):
class NODE_PT_backdrop(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "View"
bl_label = "Backdrop"
@classmethod
@@ -585,7 +594,7 @@ class NODE_PT_backdrop(Panel):
class NODE_PT_quality(bpy.types.Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "Options"
bl_label = "Performance"
@classmethod
@@ -639,7 +648,7 @@ class NODE_UL_interface_sockets(bpy.types.UIList):
class NODE_PT_grease_pencil(AnnotationDataPanel, Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "View"
bl_options = {'DEFAULT_CLOSED'}
# NOTE: this is just a wrapper around the generic GP Panel
@@ -653,7 +662,7 @@ class NODE_PT_grease_pencil(AnnotationDataPanel, Panel):
class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
- bl_category = "Node"
+ bl_category = "View"
bl_options = {'DEFAULT_CLOSED'}
# NOTE: this is just a wrapper around the generic GP tools panel
@@ -672,7 +681,7 @@ def node_panel(cls):
node_cls.bl_space_type = 'NODE_EDITOR'
node_cls.bl_region_type = 'UI'
- node_cls.bl_category = "Node"
+ node_cls.bl_category = "Options"
if hasattr(node_cls, 'bl_parent_id'):
node_cls.bl_parent_id = 'NODE_' + node_cls.bl_parent_id
@@ -694,6 +703,7 @@ classes = (
NODE_PT_active_node_color,
NODE_PT_active_node_properties,
NODE_PT_texture_mapping,
+ NODE_PT_active_tool,
NODE_PT_backdrop,
NODE_PT_quality,
NODE_PT_grease_pencil,