ActionManager best practices

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:

  1. 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
  2. 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.

It occurred to me in the case of #2 that every time a trigger occurs it would check the predicate condition for each action for each mesh, so maybe it is more efficient to use individual action managers as in #1 (although we aren’t expecting hundreds of meshes so the performance difference may be minor)?

I agree that approach #1 would be more efficient, but yeah, if there aren’t too many meshes then this wouldn’t matter much :thinking: @Deltakosh any thoughts on this?

Yes I do agree as well. #1 is far better

Thank you. Will proceed as you recommend.