It that checks the context you are pasting in and the type of node you are trying to paste in some cases.
For example, it will paste copied nodes in geo level as sop imports when pasting in lops and it wil paste cop networks as an image node when working in a materialXSubnet.
I bind it to ctrl + shift + v
Below is the code. It's not optimized, but it works.
#should refactor with only the node being created in the a forloop import hou network = hou.ui.curDesktop().paneTabUnderCursor() networkpath = network.pwd().path() pos = network.cursorPosition() clipboard = hou.ui.getTextFromClipboard() context = hou.node(networkpath) n = 0 shader = 0 # shader types # 0 = null error # 1 = mtlx print("context : " +context.type().name()) print("contextparent : " +context.parent().type().name()) if clipboard: list = clipboard.split() print("____") for item in list: n += 1 print(n) n=0 #for using cops in shaders entry = hou.node(list[0]) print(hou.node(list[0]).type().name()) print(entry.parent().type().name()) #check if cop node if entry.parent().type().name() == 'cop2net' or entry.parent().type().name() == 'img' and hou.node(list[0]) != None: #check if in shading context if context.parent().type().name() == 'materiallibrary' or context.parent().type().name() == 'mat': for item in list: if hou.node(item) != None: #check chader type for child in context.children(): #print (child) name = str(child) #print (name) if hou.patternMatch("*tlx*", name): shader = 1 #create node if shader == 1: if hou.node(item) != None: node = hou.node(networkpath).createNode('mtlximage','merge_'+item.split('/')[-1]) node.parm('file').set('op:'+str(item)) node.setPosition(pos) node.move([n*1,-0.9*n]) if n == 0: node.setSelected(True,True) else: node.setSelected(True,False) n = n + 1 #for geo context elif context.type().name() == 'geo' or context.type().name() == 'sopnet' or context.type().name() == 'sopsolver::2.0': for item in list: if hou.node(item) != None: merge = hou.node(networkpath).createNode('object_merge','merge_'+item.split('/')[-1]) merge.parm('objpath1').set(str(item)) merge.setPosition(pos) merge.move([n*1,-0.9*n]) if n == 0: merge.setSelected(True,True) else: merge.setSelected(True,False) n = n + 1 #for lop context elif context.type().name() == 'stage': print('in stage') for item in list: if hou.node(item) != None: sopimport = hou.node(networkpath).createNode('sopimport','merge_'+item.split('/')[-1]) sopimport.parm('soppath').set(str(item)) sopimport.setPosition(pos) sopimport.move([n*1,-0.9*n]) if n == 0: sopimport.setSelected(True,True) else: sopimport.setSelected(True,False) n = n + 1 else: print('no logic setup') n = 0 print("__________________________________________________")