I made a Cycles script node using OSL. Works great. To modify what it does, is it possible to add a checkbox, like for example the "Clamp" checkbox in math nodes?


1 Answer 1


There is a thing called 'string widget' (metadata syntax), which may be of some interest. The OSL specs suggest it in page 18 chapter 4, but that syntax may not be implemented in cycles. I haven't seen any examples of its usage. (Except for vray - 3dsmax docs)

if Implemented from the specs, it would look something like this:

int clamp = 0
    [[ string widget = "checkBox"]],

The implementor, Dingto, confirmed on IRC that metadata is not supported - yet.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .