I have several meshes that I want to attach actions to. Normally you would use an actionmanager per mesh as the registered actions are triggered for every mesh attached to the same actionmanager instance. However, I want to be able to set properties across all action managers, such as isRecursive and hoverCursor. So I force every mesh to use the same action manager instance. This in turn requires a unique action to be registered for each mesh that contains a predicate to verify that the picked mesh is the one associated with the edit action. The alternative would be to iterate over all meshes unique action manager instances and set the hoverCursor. My question is which approach, if either is more consistent with the expected use of actions:
- Each mesh should have a unique action manager instance and any values to be set on all mesh actionManagers should be done via an observer for each or keeping the action managers in a list and iterating them all to set properties
- Having a single action manager instance shared across all meshes with a unique set of actions for each mesh that contain a predicate to test that the action was directed at that mesh.
I suspect that it doesn’t matter, but I want to confirm. The documentation seems to imply a unique action manager instance for each mesh.