UI: Node Editor Properties single column

Color and Properties panels as sub-panels of Node. Collapse Node properties
by default, since they are already in the node itself and in material properties.
This commit is contained in:
Pablo Vazquez 2018-07-25 15:04:19 +02:00
parent 5f1ead6395
commit 421017d24a
Notes: blender-bot 2023-02-14 08:45:09 +01:00
Referenced by issue #55948, Curves visiblity
1 changed files with 16 additions and 8 deletions

View File

@ -364,7 +364,6 @@ class NODE_PT_active_node_generic(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
bl_label = "Node"
# bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
@ -383,6 +382,7 @@ class NODE_PT_active_node_color(Panel):
bl_region_type = 'UI'
bl_label = "Color"
bl_options = {'DEFAULT_CLOSED'}
bl_parent_id = 'NODE_PT_active_node_generic'
@classmethod
def poll(cls, context):
@ -410,6 +410,8 @@ class NODE_PT_active_node_properties(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
bl_label = "Properties"
bl_options = {'DEFAULT_CLOSED'}
bl_parent_id = 'NODE_PT_active_node_generic'
@classmethod
def poll(cls, context):
@ -453,18 +455,22 @@ class NODE_PT_backdrop(Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
snode = context.space_data
layout.active = snode.show_backdrop
layout.prop(snode, "backdrop_channels", text="")
layout.prop(snode, "backdrop_zoom", text="Zoom")
col = layout.column(align=True)
col.label(text="Offset:")
col.prop(snode, "backdrop_offset", text="")
col = layout.column()
col.prop(snode, "backdrop_channels", text="Channels")
col.prop(snode, "backdrop_zoom", text="Zoom")
col.prop(snode, "backdrop_offset", text="Offset")
col.separator()
col.operator("node.backimage_move", text="Move")
layout.operator("node.backimage_fit", text="Fit")
col.operator("node.backimage_fit", text="Fit")
class NODE_PT_quality(bpy.types.Panel):
@ -479,6 +485,7 @@ class NODE_PT_quality(bpy.types.Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
snode = context.space_data
tree = snode.node_tree
@ -522,6 +529,7 @@ class NODE_UL_interface_sockets(bpy.types.UIList):
class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
bl_options = {'DEFAULT_CLOSED'}
# NOTE: this is just a wrapper around the generic GP Panel