[Bf-funboard] World And Object Context For Custom Node Trees?
bassam at urchn.org
Thu Aug 21 23:47:44 CEST 2014
If you click on the edit source in the right click menu there, you will
find your self at line 45 of space_node.py
you're in the the draw function of NODE_HT_header, so I'm guessing you
can make a draw function to append/prepend there, similar to the lines
from 43 to 45 in space_node.py, that can use some other property
(probably defined by you) to specify a 'context' for your own node
so something like:
def my_draw_code(self, context):
""" add extra buttons to header """
layout = self.layout
# code to add your buttons/selectors for context here
bpy.types.NODE_HT_header.append(my_draw_code) # somewhere in the
register function of your exporter
afaik you can append or prepend, but you can't jam the buttons in the
middle (sadly) so it won't show up in the same place as it does for
Hope that helps
On Thu, 2014-08-21 at 15:49 -0400, Atomic Perception wrote:
> Hi All,
> I am wondering if it is possible to make the world and object context
> buttons of the node editor available to custom node trees? I am
> implementing a scene exporter and would like my exporter to have a node
> tree for both World and Object contexts.
> I have a thread started here on the topic but no answer yet.
> Bf-funboard mailing list
> Bf-funboard at blender.org
More information about the Bf-funboard