[Bf-blender-cvs] [53e191e0a5e] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Thu Jun 28 08:50:22 CEST 2018
Commit: 53e191e0a5e229dfff7a8bb1ac18e8dbd5120b31
Author: Campbell Barton
Date: Thu Jun 28 08:50:11 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB53e191e0a5e229dfff7a8bb1ac18e8dbd5120b31
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_text.py
index af9c0e80ae5,d0067012ffe..37ea88dd546
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@@ -46,38 -49,38 +46,44 @@@ class TEXT_HT_header(Header)
row.prop(st, "show_word_wrap", text="")
row.prop(st, "show_syntax_highlight", text="")
- if text:
- is_osl = text.name.endswith((".osl", ".osl"))
+ layout.separator_spacer()
- if is_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")
- row = layout.row()
- row.active = text.name.endswith(".py")
- row.prop(text, "use_module")
+ layout.separator_spacer()
+
+ if text:
- osl = text.name.endswith(".osl") or text.name.endswith(".oso")
++ is_osl = text.name.endswith((".osl", ".osl"))
row = layout.row()
if text.filepath:
if text.is_dirty:
- row.label(text=iface_("File: *%r (unsaved)") %
- text.filepath, translate=False)
+ row.label(
+ iface_(f"File: *{text.filepath} (unsaved)"),
+ translate=False,
+ )
else:
- row.label(text=iface_("File: %r") %
- text.filepath, translate=False)
+ row.label(
+ iface_(f"File: {text.filepath}"),
+ translate=False,
+ )
else:
- row.label(text="Text: External"
- if text.library
- else "Text: Internal")
+ row.label(
+ "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