[Bf-committers] node size

François T. francoistarlier at gmail.com
Thu Apr 12 14:50:35 CEST 2012


works perfectly !
thanks a lot :)

2012/4/10 François T. <francoistarlier at gmail.com>

> Great thanks
>
>
> 2012/4/10 Lukas Tönne <lukas.toenne at googlemail.com>
>
>> > Maybe I missed it, but I can't find a property which would be the size
>> of a
>> > node. That would be very helpful when scripting node to organize them.
>> > Would it be possible to add it ?
>>
>> Indeed, these are missing in the API. See below [1] for a quick patch.
>> We're at BCon 4 atm, so trunk will have to wait for two more weeks or
>> so. Notes:
>>
>
>
>
>
>
>> * height doesn't have an effect in most nodes, since this is
>> recalculated on drawing based on the number of inputs, extra buttons,
>> etc. The "frame" node is currently the only one actually using a free
>> height value.
>> * width and height have fixed limits (type specific).
>> * There are two separate width values ('width' and 'width_collapsed')
>> used for the expanded/collapsed node display respectively.
>> * Nodes Group node values currently also depend on their open/closed
>> state (will change with the upcoming group nodes patch).
>>
>> > While I'm at it :
>> > len(scene.node_tree.nodes['RGB'].outputs) = 1
>> > len(scene.node_tree.nodes['RenderLayer'].outputs) = 28
>> >
>> > RGB which is a rgb input node return 1 output which is correct.
>> > But the RenderLayer return 28 even if I only have one pass selected. Is
>> > that normal or is it a "bug" ?
>>
>> Yes, the render layers node currently generates all possible render
>> pass output sockets on creation, then just disables all but the used
>> passes (SOCK_UNAVAIL flag in C). By now nodes can actually quite
>> easily use real dynamic socket lists (file output node does this), so
>> in the future this might change. Best way to handle this in the API
>> would probably be to simply skip the disabled sockets, no use in
>> actually including them in the collection.
>>
>> {1]
>> http://www.pasteall.org/30800/diff
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>
>
>
> --
> ____________________
> François Tarlier
> www.francois-tarlier.com
> www.linkedin.com/in/francoistarlier
>



-- 
____________________
François Tarlier
www.francois-tarlier.com
www.linkedin.com/in/francoistarlier


More information about the Bf-committers mailing list