mirrorNodes v2.0

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
Website: www.ohufx.com
mirror the selected nodes in the DAG
10.0, 9.0, 8.0, 7.1, 7.0, 6.3, 6.2, 6.1, 6.0 or later
Linux, Mac, Windows
07 Jul 2017

2.0 - added optional argumebt to use last or first selected node as the axis for mirroring
     - mirror is animated to keep track of nodes
     - the required menu entries are included in teh module now so the local menu.py only needs this line: import mirrorNodes

1.1 - corrected resulting positions and made undo work

Mirrors the nodes in the node graph to quickly rearrange portions of the DAG.

example menu.py entry (included in v2.0):

menuBar = nuke.menu('Nuke')
menuBar.addCommand('Edit/Node/Mirror/horizontally', 'mirrorNodes.mirrorNodes( nuke.selectedNodes(), direction='x' )', 'alt+ctrl+x')
menuBar.addCommand('Edit/Node/Mirror/vertically', 'mirrorNodes.mirrorNodes( nuke.selectedNodes(), direction='y' )', 'alt+ctrl+y')

for v2.0 simply put this in your menu.py:
    import mirrorNodes



I map things like this to hotkeys and hide them in that ridiculously deep sub menu:mirrorNodes_02


Please login in order to download these files.


# Frank Rueter 2010-10-18 15:31
just subscribing to this feedback thread
# Deke Kincaid 2011-05-18 21:23
only issue is the undo doesn't work on it.
# Frank Rueter 2011-05-18 21:55
oops, indeed. it's fixed now. v1.1 also calculates the proper node centres, before it was using their positions which went very wrong when backdrops were involved. thanks for letting me know.
# Prabhamrit Singh 2017-07-06 09:45
This script flip all the node from right to left, top to bottom,
what if we want the last node select to be the axis of this flip.
# Frank Rueter 2017-07-06 21:42
That could be done. Currently it uses the average position to determine the axis.
I'm pretty busy at the moment but will try and look into it.
# Prabhamrit Singh 2017-07-07 05:35
Thanks for speedy response.
# Frank Rueter 2017-07-07 05:46
np. I assume by "last node" you mean the bottom most node, not the node that was selected last?
# Prabhamrit Singh 2017-07-07 06:08
The node that was selected last.
# Prabhamrit Singh 2017-07-07 06:20
The node that was selected last
# Prabhamrit Singh 2017-07-07 06:22
# Frank Rueter 2017-07-07 06:24
makes sense, will have a look
+1 # Frank Rueter 2017-07-07 06:55
Done. try v2.0
# Prabhamrit Singh 2017-07-07 06:58
# Prabhamrit Singh 2017-07-07 07:20
Thanks for help, Its working the right way.

You have no rights to post comments

We have 2813 guests and 39 members online