Set shortcut with DzActionMgr::addCustomAction?
Omniflux
Posts: 377
I am unable to set a shortcut with DzActionMgr::addCustomAction. Can someone confirm it does not work, and I am not just doing something incorrectly?
I just posted a script in the thread Selecting the Active Viewport script or hotkey.
I was trying
MainWindow.getActionMgr().addCustomAction ('Action Text', 'Action Description', '{...}', false, 'Alt+1');
but no shortcut was set. I ended up calling DzActionMgr::setCustomActionShortcut to set the shortcut after creating the action instead.
Comments
Have you tried using http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/actionmgr_dz#a_1adc4cad65f9921c87e64008f6e6f6ac40 on ana ction with a shortcut to double-check the formatting?
I confirm it does not work.
@Richard Haseltine
Yes, I did.
@jag11
Thanks for verifying. I have opened a ticket (#408745) for this issue.
I am told you should watch the change log, which sounds promising.
From change log:
Source maintenance
Fixed an issue with incorrectly setting the asset id of some modifier types when duplicating an object
Fixed an issue with DzActionMgr::addCustomAction() not assigning the shortcut parameter to the newly created custom action
Removed errant warnings when removing mapped directories
DAZ Studio : Incremented build number to 4.20.1.28