nyholku wrote:However, I very much doubt this has anything to do with my changes
I don't know what I did but a fresh build works. Win build here: navicube for those that want to play.
What is the dropdown next to the small cube? I get a list of tests that don't do anything.
That menu is for view related commands, yet to be defined. Perhaps this could be something that the user could customise via python or something. I thin 'Piemenu' modula has something like that.
In Onshape this menu has stuff as below (not suggesting FreeCAD should take this onboard lock stock and barrel:
I checked windows build. Thanks. Cube looks fine. What would be fine and IMO innovative, that that cube could appear under mouse by pressing for example "shift" button, that would save moving mouse to the corner to manipulate to. What do you think?
One of the projects i plan to finish when it comes to FreeCAD is AccessoriesMenu. I won't overcomplicate things but one of the things it will likely be able to do is for the end user (or developer) to add some commands in it. It will be placed in global menu. I don't see any special reason why such menu couldn't be placed elsewhere.
If that is some standard Qt button and you can add QMenu to it and set its object name. I could likely find that QMenu and if it would exist use it in similar way as AccessoriesMenu will work. Or then again just using standard Qt button with object name set would do.
I gave it some thought and as for the menu. When user presses on the NaviCube menu button area in the 3D View. Standard QMenu should pop-up (at the mouse position). This QMenu should be permanent. It should have objectName set (for example name Menu_NaviCube) and its parent should be main window.
from PySide import QtGui
mw = FreeCADGui.getMainWindow()
menu = mw.findChild(QtGui.QMenu, "Menu_NaviCube")
If you will do it like that and once you will have that working adding view related commands to it shouldn't be hard (by adding existing QActions).
P.S. And as for possible future customization capability (if you don't plan to implement that yourself). AccessoriesMenu or some other solution could work with that.
triplus wrote: ↑Wed Feb 22, 2017 5:42 pm
I gave it some thought and as for the menu. When user presses on the NaviCube menu button area in the 3D View. Standard QMenu should pop-up (at the mouse position). This QMenu should be permanent. It should have objectName set (for example name Menu_NaviCube) and its parent should be main window.
from PySide import QtGui
mw = FreeCADGui.getMainWindow()
menu = mw.findChild(QtGui.QMenu, "Menu_NaviCube")
If you will do it like that and once you will have that working adding view related commands to it shouldn't be hard (by adding existing QActions).
P.S. And as for possible future customization capability (if you don't plan to implement that yourself). AccessoriesMenu or some other solution could work with that.
nyholku wrote: ↑Wed Feb 22, 2017 6:35 pm
Thanks, sounds like a plan, I will have a look at implementing this.
wbr Kusti
I see that that was implemented as discussed, and i can make use of it. I have just finished implementing all planned features for command panel module for FreeCAD. Is having NaviCube menu customizable still desired? If yes i can port command panel module and add such support. Have some questions, though:
What set of commands should be in the menu by default.
Should module developers have a menu entry reserved for them? For being able to add some predefined workbench related entries in such menu through an API?
If yes naming such menu entry Workbench or System or something else.
I plan to use terminology navigation cube menu and the module name NaviCubeMenu.
I've recently started playing with a lighter background colour for the 3D view and quickly found that pure white is a little too much for my taste, so I went for a light grey. Unfortunately, I needed to make the grey darker than I'd like, otherwise the rotation arrows around the cube do not show enough contrast with the background. For 0.19, it would be great to have some kind of theme-ing for the navicube, one for light backgrounds and one for dark backgrounds (the current default blue gradient).
I would be remiss not to mention that ideally, the labels on the faces should be translatable... In the French version of DWG TrueView I have at work, the faces of the navigation cube are in French. Of course that may be problematic when the translated word has many more characters than the English one.
Attachments
FC018_navicube_light_background_01.png (3.56 KiB) Viewed 1032 times