[BUG REPORT] Nuke Connector menu.py

Discussions related to all NIM connectors.
Post Reply
Posts: 7
Joined: September 9th, 2015, 10:00 pm

[BUG REPORT] Nuke Connector menu.py

Post by danbradham »

Just noticed this bug in the menu.py included with the nuke plugin. There is some logic for testing whether the current application is Nuke and uses the nuke.env variable to check if 'studio' or 'hiero' are set to True. This is probably only a problem for older versions of Nuke but these env keys are not available in 8.0v6 for me. Simple solution would be to replace:

Code: Select all

    isNuke = False
    if nuke.env['NukeVersionRelease'] > 6:
        if not nuke.env[ 'studio' ] and not nuke.env['hiero']:
            isNuke = True
        if not nuke.env[ 'studio' ]:
            isNuke = True

Code: Select all

        nuke_env = dict(nuke.env)
        is_studio = nuke_env.get('studio', False)
        is_hiero = nuke_env.get('hiero', False)
        is_nuke = not is_studio and not is_hiero
Also you guys are catching all exceptions in menu.py so when It was not working initially it was slightly irritating to debug. It would be helpful if you printed the stack trace on exception or just removed the try except block completely and let Nuke raise the exception itself.

User avatar
Site Admin
Posts: 301
Joined: June 24th, 2014, 8:10 am

Re: [BUG REPORT] Nuke Connector menu.py

Post by andrew »

Hi Dan...

Good catch on the 8.0v6 Nuke issues. We tested the connectors with 9.0vX but did not going back to the 8.0vX versions. We'll include this in the next connector update. In 9.0v7 the code base for Nuke, Hiero, Studio is under one roof so we consolidated the connector to work with the new format.


Post Reply