Bug Report: arguments in MarkingMenuEventHandler are missing (NoneType) for sub components
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is a followup to my post in the other forum: https://forums.autodesk.com/t5/fusion-api-and-scripts/bug-report-how-to-select-which-right-click-lin...
When users right-click on elements in the browser (e.g. on the "Bodies" of the root component), our MarkingMenuHandler receives a callback with an argument indicating what they right-clicked on (e.g. adsk::fusion::BRepBodies )
This works fine for the root component in the browser, however, for all submenus of any additional components in the browser, our MarkingMenuHandler receives a callback with only a single "NoneType" argument and no way to determine what the user right-clicked on. (which might be "Bodies" or "Sketches" or "Flat Pattern" or "Origin" or "Construction" etc - always "NoneType" for those.)
You can reproduce and observe the bug with this sample code:-
https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-c90ce6a2-c282-11e6-a365-3417ebc87622
find this line in the above:
setLinearMarkingMenu(args)
and insert this code after it:
try:
if args.selectedEntities.size:
print(args.selectedEntities.front().__class__.__name__)
except:
pass
then create a new design, create a body inside that design, create a new component in the design, and create a body inside this new component, and the right-click on both of the "Bodies" items in the browser menu to see the bug on the second one
You will see this working:
says: adsk::fusion::BRepBodies
And this not working:-
says: NoneType
I hope you like my bug report! Good luck!