[Bf-blender-cvs] [a35a0bef] soc-2016-layer_manager: Add python file for layer manager UI, add button for adding layers
Julian Eisel
noreply at git.blender.org
Tue May 24 03:04:04 CEST 2016
Commit: a35a0bef813010efae7658fca69619ce4a97292c
Author: Julian Eisel
Date: Tue May 24 03:02:53 2016 +0200
Branches: soc-2016-layer_manager
https://developer.blender.org/rBa35a0bef813010efae7658fca69619ce4a97292c
Add python file for layer manager UI, add button for adding layers
===================================================================
M release/scripts/startup/bl_ui/__init__.py
A release/scripts/startup/bl_ui/space_layers.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index 6fc668e..8fdf9b4 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -69,6 +69,7 @@ _modules = [
"space_graph",
"space_image",
"space_info",
+ "space_layers", # TODO only for WITH_ADVANCED_LAYERS
"space_logic",
"space_nla",
"space_node",
diff --git a/release/scripts/startup/bl_ui/space_layers.py b/release/scripts/startup/bl_ui/space_layers.py
new file mode 100644
index 0000000..83256f8
--- /dev/null
+++ b/release/scripts/startup/bl_ui/space_layers.py
@@ -0,0 +1,32 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+import bpy
+from bpy.types import Header, Menu
+
+
+class LAYERS_HT_header(Header):
+ bl_space_type = 'LAYER_MANAGER'
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("layers.layer_add", text="", icon='NEW')
+
+if __name__ == "__main__": # only for live edit.
+ bpy.utils.register_module(__name__)
More information about the Bf-blender-cvs
mailing list