Viewer RGB to XYZ

A python snippet to snap geometry node translate and rotate knobs from CG renders.

First submitted: 19 February 2026

Author: David Thomas

Website: https://davidjthomasvfx.com

Compatible Nuke versions: 8.0 or later

Compatibility: Source

https://davidjthomasvfx.com/tools/viewer-rgb-to-xyz

A python snippet to snap geometry node translate and rotate knobs from CG renders (position values for translate and RGB values for rotate).

With the intention to make this functionality quick and convenient for the user whilst remaining light on hardware use, it’s 3D system agnostic and nothing is live in a user’s nuke script.

### Install ###

Add viewer_rgb_to_xyz.py to a folder in your .nuke plugin path. For example…

.nuke/python/viewer_rgb_to_xyz.py

With this line in the init.py to point to it…

nuke.pluginAddPath( ‘./python‘ )

Finally, add this line to the menu.py

from viewer_rgb_to_xyz import *

### How to use ###

This is for use with CG renders so a position layer must be present (although it’s not necessary to view).

The user makes a pixel selection in the viewer for the position or rotation value they want. Then in the Properties tab, right click the translate or rotate knob in the selected geometry node to show the the Animation menu. “Viewer RGB to XYZ” should be visible somewhere at the bottom of the menu. Click this and it’s a snap!

Special thanks to Mads Hagbarth Damsbo for allowing me use of code from

https://www.nukepedia.com/tools/python/ui/quickcreate-for-nuke

From which Viewer RGB to XYZ is copied is directly / based on.

And to Erwan Leroy for

https://www.nukepedia.com/tools/toolsets/other/vectortools/

From which Viewer RGB to XYZ makes use of math expressions from Vectors_to_Degrees to calculate rotation values.

or register to download or rate.

Comments

or register to join the conversation.

Download Verification