def node_show_branch(self, context): if not displaying_sverchok_nodes(context): return branch = get_branch() if branch: layout = self.layout layout.label(icon='CON_CHILDOF', text=branch)
def unregister(): branch = get_branch() if branch: bpy.types.NODE_HT_header.remove(node_show_branch) bpy.types.NODE_PT_active_node_generic.remove(idname_draw) bpy.utils.unregister_class(SvCopyIDName) bpy.utils.unregister_class(SvViewHelpForNode) bpy.utils.unregister_class(SvViewSourceForNode)
def register(): branch = get_branch() if branch: bpy.types.NODE_HT_header.append(node_show_branch) bpy.utils.register_class(SvCopyIDName) bpy.utils.register_class(SvViewHelpForNode) bpy.utils.register_class(SvViewSourceForNode) bpy.utils.register_class(SV_MT_LoadPresetMenu) bpy.types.NODE_PT_active_node_generic.append(idname_draw)