diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-31 17:46:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-31 17:48:35 +0300 |
commit | 6df0bfad67e1dbeb84fb6121841305a7f2090b91 (patch) | |
tree | 28d037db1facbcabe95dc772c6d90ccf9575a0b1 /release/scripts | |
parent | 0bd51f4fc0942319d305c3bb0e7629c965fb2df7 (diff) |
Fix oso extension detection in the text editor
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 9e9ddcf3505..81ccc9216a1 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -57,7 +57,8 @@ class TEXT_HT_header(Header): syntax.prop(st, "show_syntax_highlight", text="") if text: - is_osl = text.name.endswith((".osl", ".osl")) + text_name = text.name + is_osl = text_name.endswith((".osl", ".oso")) row = layout.row() if is_osl: @@ -65,7 +66,7 @@ class TEXT_HT_header(Header): row.operator("node.shader_script_update") else: row = layout.row() - row.active = text.name.endswith(".py") + row.active = text_name.endswith(".py") row.prop(text, "use_module") row = layout.row() |