[Bf-cycles] osl node

Dalai Felinto dfelinto at gmail.com
Mon Oct 29 10:32:56 CET 2012


Hi Brecht,

Have you defined your osl plans for this week? As far as feature goes
I think the main problem now is to handle metadatas and create buttons
(instead of only sockets).

With help from Lukas I started giving some thoughts on that, but I'm
not happy with the current direction I'm heading to (and basically I'm
fighting too much with what may be PropertyGroup limitations). Maybe
it's worth waiting for pynodes to land in trunk for that. Would like
to hear your thoughts on it.

The idea so far is/was to parse the metadata info, and create buttons
when necessary (e.g. when UItype == enum or texture we don't want an
input socket, but a button instead). And of course, to support UImin,
UImax, label, ...

The NodeShaderScript already supports IDProperty and this would be the
best place to store the buttons/other params data. But we need a way
to store a generic bpy.prop in a bpy.types.PropertyGroup to be defined
later (i.e. so we can create the prop itself once we parse the
individual buttons.

This (non committed) patch should illustrate this better (see the
NodeButtonItem class declaration)
http://www.pasteall.org/36697/diff

Thanks,
Dalai


More information about the Bf-cycles mailing list