Merge branch 'master' into blender2.8

This commit is contained in:
2018-06-28 08:50:11 +02:00
6 changed files with 25 additions and 15 deletions

View File

@@ -54,20 +54,26 @@ class TEXT_HT_header(Header):
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")