top of page

FLOP NODES

  • jnietomonco
  • Feb 8, 2023
  • 1 min read

Updated: Feb 8, 2023

I find this little code super useful. It allows you to flop all the nodes you have selected; pretty much reverse them in X. I honestly don't know who wrote it because a coworker sent it my way when I started learning Python. I have this code set to the hotkey ctrl+alt+f.


ree

Expand Flop Nodes

import nuke

def flopNodes():
	nodes = nuke.selectedNodes()
	
	maxX = max( [ n.xpos()+n.screenWidth()/2 for n in nodes ] )
	minX = min( [ n.xpos()+n.screenWidth()/2 for n in nodes ] )
	centreX = (maxX - minX)/2 + minX
	
	for n in nodes :
		n.setXpos( (centreX + (centreX - (n.xpos() + n.screenWidth()/2 )))- n.screenWidth()/2)

Javier Nieto Moncó © 2025

  • linkedin
  • vimeo
  • generic-social-link
bottom of page