[Bf-blender-cvs] [421017d24a0] blender2.8: UI: Node Editor Properties single column

Pablo Vazquez noreply at git.blender.org
Wed Jul 25 15:04:32 CEST 2018


Commit: 421017d24a05f7c83c3933d158b9cf7b8f28c00c
Author: Pablo Vazquez
Date:   Wed Jul 25 15:04:19 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB421017d24a05f7c83c3933d158b9cf7b8f28c00c

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.

===================================================================

M	release/scripts/startup/bl_ui/space_node.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 9d8c14ba9c3..45343c09b27 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -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.operator("node.backimage_move", text="Move")
+        col = layout.column()
+
+        col.prop(snode, "backdrop_channels", text="Channels")
+        col.prop(snode, "backdrop_zoom", text="Zoom")
 
-        layout.operator("node.backimage_fit", text="Fit")
+        col.prop(snode, "backdrop_offset", text="Offset")
+
+        col.separator()
+
+        col.operator("node.backimage_move", text="Move")
+        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



More information about the Bf-blender-cvs mailing list