UI: add tool panel for node editor, use tabs
This follows the 3D view, adding an "Options" tab.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user