toolbar = nuke.toolbar("Nodes")
pixelmania_menu = toolbar.addMenu("Pixelmania", icon="Pixelmania.png")
toolbar.addCommand("Pixelmania/NNRetime", "nuke.createNode('NNRetime')", icon="NNRetime.png")

# Nuke's auto-colour scheme tints NNRetime dark yellow because its class name contains "time" — it
# matches the built-in Time category (Retime / Kronos / OFlow / TimeBlur) on that substring. The
# other Pixelmania nodes have no such keyword, so they stay the default node grey. Pin NNRetime's
# default tile colour to the exact grey an uncategorised node (NoOp) uses, so new NNRetime nodes
# match the siblings instead of being auto-coloured. Wrapped so a failure here can never break the
# toolbar registration above.
try:
    nuke.knobDefault("NNRetime.tile_color", str(nuke.defaultNodeColor("NoOp")))
except Exception:
    pass
