I'm working on a custom nodetree-based addon for scientific analysis. My code requires knowledge of the active nodetree in the current context (or alternatively the parent nodetree of a selected node) which I haven't been able to obtain yet.
I noticed the addition of a "get_from_context" NodeTree class method in the 2.72 API changelog (http://www.blender.org/documentation/blender_python_api_2_72_release/bpy.types.NodeTree.html#bpy.types.NodeTree.get_from_context) which would be perfect. However when I try to call it from either bpy.types.NodeTree or an existing NodeTree object I get an attribute not found error.
What is the correct way to call this method from the NodeTree class directly? Or does anyone else have this issue? I'm quite new to Blender python dev so it could be a stupid mistake.
Alternatively, does anyone know of a way to obtain a node's parent nodetree?