Skip to content

Instantly share code, notes, and snippets.

@zeffii
Forked from anonymous/operator_example.py
Created May 6, 2014 06:24
Show Gist options
  • Save zeffii/13af9567e2e75fb1220b to your computer and use it in GitHub Desktop.
Save zeffii/13af9567e2e75fb1220b to your computer and use it in GitHub Desktop.
def sv_main(n_items=1500):
in_sockets = [['s', 'n_items', n_items]]
Verts = []
def func1():
tree_name = bpy.context.node.id_data.name
ng = bpy.data.node_groups[tree_name]
# this will read the first 'Objects in' node in
# the current tree. if you have several it would
# be necessary to check the node `label` too.
obj_in = ng.nodes['Objects_in']
obj_names = obj_in.get('objects_local', None)
print(str(obj_names))
out_sockets = [['v', 'Verts', [Verts]]]
ui_operators = [['print_names', func1]]
return in_sockets, out_sockets, ui_operators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment