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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-02-24 14:24:43 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-02-24 14:35:32 +0400
commitd59f53f7b7dac5eff66fcf182f2cdc7dfabd6f87 (patch)
tree41939ef555fe97606d1b59b83ddacc77179bc7e9 /build_files
parent7078fb936ab756c4741a56ba6036e33513bf02d3 (diff)
Support for generic OSL shader parameters in the Cycles standalone XML
reader. To make a generic OSL shader connectable to other nodes, the parameters must be declared via "input" and "output" child elements: <osl_shader name="tex" src="./osl/stripes.osl"> <input name="Stripes" type="int" /> <output name="ColorOut" type="color" /> </osl_shader> `name` must be the same as the OSL shader parameter name. `type` must be one of float, int, color, vector, point, normal, closure, string (matching cycles socket types) Beyond this the OSL script nodes then work just like all other nodes. OSL parameter sockets can be connected to other cycles nodes: <connect from="checker color" to="tex Stripes" /> <connect from="tex ColorOut" to="floor_closure color" /> They can set default values for the input sockets by attributes of the main node element: <osl_shader name="tex" src="./osl/stripes.osl" Stripes="3" > <input name="Stripes" type="int" /> <output name="ColorOut" type="color" /> </osl_shader> This system of specifying custom attributes should probably be changed, since it can easily create name conflicts and arbitrarily long elements. But that is a different issue to be solved for all nodes in general.
Diffstat (limited to 'build_files')
0 files changed, 0 insertions, 0 deletions