[Bf-blender-cvs] [deead45b6e7] profiler-editor: add basic header ui
Jacques Lucke
noreply at git.blender.org
Thu Apr 29 11:30:46 CEST 2021
Commit: deead45b6e746fd80ace15c6125a9953aa2a3c5e
Author: Jacques Lucke
Date: Mon Apr 26 16:24:38 2021 +0200
Branches: profiler-editor
https://developer.blender.org/rBdeead45b6e746fd80ace15c6125a9953aa2a3c5e
add basic header ui
===================================================================
M release/scripts/startup/bl_ui/__init__.py
A release/scripts/startup/bl_ui/space_profiler.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index ef705f8fe37..aa49c91bb13 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -85,6 +85,7 @@ _modules = [
"space_nla",
"space_node",
"space_outliner",
+ "space_profiler",
"space_properties",
"space_sequencer",
"space_spreadsheet",
diff --git a/release/scripts/startup/bl_ui/space_profiler.py b/release/scripts/startup/bl_ui/space_profiler.py
new file mode 100644
index 00000000000..0ecf6190d56
--- /dev/null
+++ b/release/scripts/startup/bl_ui/space_profiler.py
@@ -0,0 +1,37 @@
+# ##### 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 #####
+
+import bpy
+
+class PROFILER_HT_header(bpy.types.Header):
+ bl_space_type = 'PROFILER'
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.template_header()
+
+
+classes = (
+ PROFILER_HT_header,
+)
+
+if __name__ == "__main__": # Only for live edit.
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
More information about the Bf-blender-cvs
mailing list