State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.1v5|BugID:394042|
Problem summary:
Binding custom actions to widgets using UI4.App.KeyboardShortcutManager no longer works as of Katana 3.1v1.
Steps to reproduce:
class SomeClass: def call_me(self, sceneGraphTab): sceneGraphView = sceneGraphTab.getSceneGraphView() selectedLocations = sceneGraphView.getSelectedLocations() print("\n\t -> {} \n".format(selectedLocations[0][1]))from UI4.App.KeyboardShortcutManager import (RegisterActions, BindActions, GenerateActionID)sg = UI4.App.Tabs.FindTopTab('Scene Graph')actionName = 'Print Selection'actionID = GenerateActionID(actionName)c = SomeClass()actions = {actionName: (actionID, 'P', c.call_me)}RegisterActions('Scene Graph Tab', actions)BindActions('Scene Graph Tab', sg) Expected behaviour:
The P key is bound to the new action, and can be pressed to print the scene graph location path of one of the locations that are currently selected in the Scene Graph tab.
Actual behaviour:
A Python exception is raised, with a traceback similar to the following:
File "<string>", line 18, in <module>BindActions('Scene Graph Tab', sg)File "bin/python/UI4/App/KeyboardShortcutManager/KeyboardShortcutManager.py", line 754, in BindActionsAttributeError: <__plugins22__.SceneGraphTab.SceneGraphTab.SceneGraphTab object at 0x7efcc629b218> has no attribute call_me Workaround:
No known workaround.
Tested versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why