Closed david-cattermole closed 2 years ago
Work is starting back up on this feature, here are some more details.
The expected features of the "mmMarkerShape" node are:
Here is the full feature list I have thought of:
Make sure to draw a 3D point and lines using the API, there can be problems with viewport selection when using 2D drawing methods (I cannot remember the exact details)
The shape should probably stay the same size in screen-space; like an icon, not a locator which can become smaller or larger. This can be semi-difficult when using 3D drawing.
Let the marker shape be hidden when viewed by any camera that isn't directly above it; if you want to find node above the current one in the API you can use MFnDagNode push() and pop(), I've found them very easy to use.
Draw a line between the Marker and Bundle; you will require a world space position for the bundle, remember there is a message connection between the Marker and Bundle nodes.
Use the MUIDrawManager class; it will work on any graphics card, OpenGL or DirectX.
Don't worry about viewport 1, it's too much work to get both viewports exactly the same. viewport 1 will be completely deprecated from Maya very soon, I expect.
Before final release, the MTypeID must be set properly. I have a list of ids that are availaible (I'm not publicly posting these ids)
It might be cool to make Markers slightly transparent (alpha of 0.7) and have the them full alpha when the user selects them, so we override the selection colour for the node. Lets experiment and see what "feels" right.
Before releasing this new feature, we should use an environment variable (defined in the .mod file), to turn on/off this new feature. Once the feature is turned on, Maya scene files will need it always and we can never remove it.
For initial beta testing, a Python API version of the marker shape is ok, but eventually it will make sense to port this to C++ (for performance).
This has been started on the "develop" branch with some code merged in from Patcha.
Full integration is still on-going and will be added into v0.4.0.
Closing. This has been released in v0.4.0.
The node name should probably be
mmMarkerShape
.The mmMarkerShape should have the following features:
If possible, we should draw a line (in the viewport) between the Marker and Bundle nodes.
As a hint, maybe we can use the
perCameraVisibility
to make the marker only visible under a specific camera. https://help.autodesk.com/cloudhelp/2016/CHS/Maya-Tech-Docs/Commands/perCameraVisibility.htmlWe should support Viewport 2.0, in Maya 2016, 2017, 2018 and 2019. If viewport 1.0 support is easy, we should also support it, but not if it's difficult.