ID 600498 - Callbacks like onCreate are removed from LiveGroups when the node is Published

Follow

Problem summary:
Callbacks like onCreate are removed from LiveGroups when the node is Published
 
Customer reported version:
Nuke 15.1v5
 
Customer reported platform:
Alma 8
 
Steps to reproduce:
1) Launch Nuke and open the Script Editor window
2) Run the following code to create a LiveGroup node with an onCreate callback, then Copy/Paste the LiveGroup when it is Editable and Published:

callback_str = 'print(f"{nuke.thisNode().name()} - onCreate callback executed")' lg = nuke.createNode('LiveGroup') with lg:     nuke.createNode("ColorWheel")     nuke.createNode("Output") lg['onCreate'].setValue(callback_str) print("Copy/Pasting editable LiveGroup...") nuke.nodeCopy("%clipboard%") lg2 = nuke.nodePaste("%clipboard%") lg2.setSelected(False) lg.setSelected(True) lg.publish("C:/temp/my_lg_file.nk") print("Copy/Pasting published LiveGroup...") nuke.nodeCopy("%clipboard%") nuke.nodePaste("%clipboard%")
3) Observe how the callback only persists for the Copied nodes if the original LiveGroup was not Published. Alternatively, save, close, and reopen the Nuke script, and observe how the callbacks no longer exist on the Published LiveGroups.
 
Expected behavior:
Callbacks attached to a LiveGroup node should always be saved and preserved, regardless of its Published status.
 
Actual behavior:
If a callback is attached to a LiveGroup node, it will be removed once the LiveGroup is Published.
 
Workaround:
No known workaround at this time.
 
Reproduced by Support in:
Nuke 16.0v3 - Windows 11, macOS 14 Sonoma
Nuke 15.0v1 - Windows 11
Nuke 14.0v1 - Windows 11
Nuke 13.0v1 - Windows 11
 
Earliest version tested:
Nuke 13.0v1 - This issue appears to be in all tested versions of the product 

    We're sorry to hear that

    Please tell us why