ID 377244 - The Grain node's PresetID has changed between versions.. may cause naming issues.

Follow

Problem summary
Users who use nuke.getNodePresetID() have found the Grain node's Preset ID has changed with Nuke11.3v1.

Nuke11.2v5 ( and earlier ) :



Nuke11.3v1 :



This can cause issues with earlier scripts if the user has used nuke.getNodePresetID() within their Python scripting.

Customer reported version
nuke.11.3v1

Customer reported platform

Steps to reproduce

1) Open Nuke11.3v1

2) Create a Grain node

3) Copy/Paste/Execute the following in the Script Editor while selecting the Grain node:

selectedNodes = nuke.selectedNodes()

for node in selectedNodes: print nuke.getNodePresetID(node)
Result 1: Within the Script Editor, it will print the following:
# Result: Group7719682074798230515
4) Follow the steps above with Nuke11.2v5 or earlier

Result 2: Within the Script Editor, it will print the following:
# Result: Group8532992469680373393

Workaround

Option 1:

Continue compatibility with earlier scripts:

selectedNode = nuke.selectedNode()
grainPresetID = nuke.getNodePresetID(selectedNode)

if grainPresetID == 'Group7719682074798230515':
print 'Nuke11.3 Grain, use legacy group instead'
grainPresetID = 'Group8532992469680373393'
else:
print 'Nuke11.2 and earlier Grain detected, continue using legacy naming scheme'

Option 2:

Switch functions to use node.Class() instead.


This is the recommended method as node.Class() uses the Grain node's proper name instead of a Group naming scheme.


Reproduced by support

This bug has been reproduced in:
Nuke11.3v1- Windows 7 - Mac10.13 - CentOS7 - Regression

Unable to reproduce bug in:
Nuke11.2v5 - Windows 7 - Mac10.13 - CentOS7

Earliest version tested
- This issue no longer appears in this version and has regressed

Expected behaviour
Users can use nuke.getNodePresetID() without worrying about name changes.

Actual behaviour
Due to Grain node changes, its presetID has changed, which may cause issues in some Python setups.

    We're sorry to hear that

    Please tell us why