Skip to content

Instantly share code, notes, and snippets.

@zeffii
Last active July 26, 2016 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/4bc182f6b73316b9f2e8b2f554fb2bb7 to your computer and use it in GitHub Desktop.
Save zeffii/4bc182f6b73316b9f2e8b2f554fb2bb7 to your computer and use it in GitHub Desktop.
node_tree back button
import bpy
AREA = 'NODE_EDITOR'
for window in bpy.context.window_manager.windows:
for area in window.screen.areas:
if not area.type == AREA:
continue
for s in area.spaces:
if s.type == AREA:
if len(s.path) == 1:
s.path.pop()
s.path.append(bpy.data.node_groups['NodeTree'])
s.path.append(s.path[0].node_tree)
import bpy
AREA = 'NODE_EDITOR'
for window in bpy.context.window_manager.windows:
for area in window.screen.areas:
if not area.type == AREA:
continue
for s in area.spaces:
if s.type == AREA:
if len(s.path) == 1:
s.path.append(s.path[0].node_tree)
s.path[0] = bpy.data.node_groups['NodeTree']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment