Archived post by WaffleboyTom

“`nodes = hou.selectedNodes()
#get pane editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
#reset images
editor.setBackgroundImages([])
#get images
b_img = [img for img in editor.backgroundImages()]
for node in nodes: for parm in node.parms(): if(len(parm.keyframes())>0): #create image img = hou.NetworkImage() size = node.size() img.setRect(hou.BoundingRect(-2,-0.5,size[0],size[1])) img.setRelativeToPath(node.path()) img.setPath(‘$SIDEFXLABS/misc/stickers/emoji/SIDEFX_CUSTOM_EMBLEMS 08.png’) b_img.append(img) break editor.setBackgroundImages(b_img)“`

use this one instead

takes the size of node in consideration