State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.2v5|BugID:415305|
Problem summary
Farm API menu options added via FarmAPI.AddFarmMenuOption() do not trigger their connected action when selected in the Utils menu.
Customer reported version
Katana 3.2v2
Steps to reproduce
from Katana import FarmAPIdef onStartup(**kwargs):
# Add menu options
FarmAPI.AddFarmMenuOption("Potato", _printPotato)
FarmAPI.AddFarmPopupMenuOption("Potato", _printPotato)
Callbacks.addCallback(Callbacks.Type.onStartup, onStartup)
def _printPotato():
print "Potato"
Expected behaviour
The callback connected to the menu option should be triggered, printing "Potato" to the console.
Actual behaviour
The callback connected to the menu option is not triggered and nothing is printed to the console.
Workaround
Use the FarmAPI.AddFarmPopupMenuOption() function instead to add a menu option to Render nodes' context menu and select the option from there.
Reproduced by support
This bug has been reproduced in:
Katana 3.2v2 - Windows 10/CentOS7
Katana 3.1v1 - Windows 10/CentOS7
Unable to reproduce bug in:
Katana 3.0v9 - Windows 10/CentOS7 - This issue doesn't appear in this version and has regressed
Katana 3.0v1 - Windows 10/CentOS7
Katana 2.5v1 - Windows 10/CentOS7
We're sorry to hear that
Please tell us why