[Bf-blender-cvs] [252d1d8e226] blender2.8: UI: Center ID Blocks in Text Editor
William Reynish
noreply at git.blender.org
Thu Jun 28 00:49:24 CEST 2018
Commit: 252d1d8e226a9f9c491b81405cd454bfcc263e78
Author: William Reynish
Date: Thu Jun 28 00:28:32 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB252d1d8e226a9f9c491b81405cd454bfcc263e78
UI: Center ID Blocks in Text Editor
See T55635
===================================================================
M release/scripts/startup/bl_ui/space_text.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index b1af82c95fe..eccb0ecdddf 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -41,27 +41,22 @@ class TEXT_HT_header(Header):
sub.alert = True
sub.operator("text.resolve_conflict", text="", icon='HELP')
- row = layout.row(align=True)
- row.template_ID(st, "text", new="text.new", unlink="text.unlink", open="text.open")
-
row = layout.row(align=True)
row.prop(st, "show_line_numbers", text="")
row.prop(st, "show_word_wrap", text="")
row.prop(st, "show_syntax_highlight", text="")
- if text:
- osl = text.name.endswith(".osl") or text.name.endswith(".oso")
+ layout.separator_spacer()
- if osl:
- row = layout.row()
- row.operator("node.shader_script_update")
- else:
- row = layout.row()
- row.operator("text.run_script")
+ row = layout.row(align=True)
+ row.template_ID(st, "text", new="text.new", unlink="text.unlink", open="text.open")
+
+ layout.separator_spacer()
- row = layout.row()
- row.active = text.name.endswith(".py")
- row.prop(text, "use_module")
+
+
+ if text:
+ osl = text.name.endswith(".osl") or text.name.endswith(".oso")
row = layout.row()
if text.filepath:
@@ -75,6 +70,18 @@ class TEXT_HT_header(Header):
row.label(text="Text: External"
if text.library
else "Text: Internal")
+ if osl:
+ row = layout.row()
+ row.operator("node.shader_script_update")
+ else:
+ row = layout.row()
+ row.active = text.name.endswith(".py")
+ row.prop(text, "use_module")
+
+ row = layout.row()
+ row.operator("text.run_script")
+
+
class TEXT_MT_editor_menus(Menu):
More information about the Bf-blender-cvs
mailing list