[Bf-python] PyNodes NodeTree

Paul Kilgo paulkilgo at gmail.com
Thu Aug 22 12:32:13 CEST 2013


Hi Alexander

1) I asked this to #blender-coders not too long ago and the consensus
seemed to be to just read the module itself. The primary use I know of is
for building the "Add Node" menu (for when you Shift+A). I have an example
of its basic usage here if you like:

https://gist.github.com/OEP/5978445

2) Someone else is probably better suited to answer this question, but I
worked on PyNodes over the summer and did not ever figure this out. The
best I could do was figure out which nodes (in ALL trees) were selected
using the ".selected" property

3) Oh, this could be your answer to #2, I don't think that was in the
2.67-level API. Just a guess, I don't have 2.68 installed, but it looks
like its usage is:

    tree, owner, selected = bpy.types.NodeTree.get_from_context(context)

Hopefully this helps!


On Thu, Aug 22, 2013 at 3:00 AM, Александр Недовизин <t9630799550 at mail.ru>wrote:

> Hello everyone!
> 1) Where can I get a description of the module "nodeitems_utils"?
> 2) how to get the current Nodetree (PyNode) from context?
> There bpy.context.blend_data.node_groups, again, is a collection (array).
> And need a particular NodeTree.
> 3) And how can you use the method get_from_context not clear. My attempts
> have failed.
>
>
> http://www.blender.org/documentation/blender_python_api_2_68_release/bpy.types.NodeTree.html#bpy.types.NodeTree
> When this method works and how to use it?
>
>
>
> --
> Alexander Nedovizin
> (Russia)
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
>


-- 
Paul Kilgo
paulkilgo at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20130822/c017e113/attachment.html>


More information about the Bf-python mailing list