Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-03 18:32:26 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-03 18:32:26 +0400
commite02b23b81ab05579c0ee11ee3a1acb283643e528 (patch)
tree59b14c01bcb4c274d57c89a42e5a5d80c41ff06d /release/scripts/startup/bl_ui/space_text.py
parent615fe0295fe13c229d7376b02a50ac110b636c47 (diff)
Render API: shader script node for custom shaders.
* Shader script node added, which stores either a link to a text datablock or file on disk, and has functions to add and remove sockets. * Callback RenderEngine.update_script_node(self, node) added for render engines to compile the shader and update the node with new sockets. Thanks to Thomas, Lukas and Dalai for the implementation.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_text.py')
-rw-r--r--release/scripts/startup/bl_ui/space_text.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index eca9bc22db9..8a853a09199 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -56,12 +56,17 @@ class TEXT_HT_header(Header):
row.prop(st, "show_syntax_highlight", text="")
if text:
- row = layout.row()
- row.operator("text.run_script")
+ osl = text.name.endswith(".osl") or text.name.endswith(".oso")
- row = layout.row()
- row.active = text.name.endswith(".py")
- row.prop(text, "use_module")
+ if osl:
+ row = layout.row()
+ row.operator("node.shader_script_update")
+ else:
+ row = layout.row()
+ row.operator("text.run_script")
+
+ row = layout.row()
+ row.prop(text, "use_module")
row = layout.row()
if text.filepath: