New way to get entities selected for tk-shotgun app callback

Continuing the discussion from Tk-shotgun-app getting information from Shotgun:

I’m also writing a custom tk-shotgun app at the moment to add actions to the right click menu. Looking at the code throughout the shotgunsoftware organisation, I saw a lot of mentions to the entity_type and entity_ids arguments being the old style if we were registering commands to the engine.

How would the new style callbacks, that don’t receive the entity_type and entity_ids arguments, able to access the currently selected entities on the Shotgun Website?

1 Like

Yeah, I think this is confusing and I wouldn’t read too much into this.
I’m not sure about the history here as it’s before my time at Shotgun, but I don’t think you need to worry about it.
If your tk-shotgun app supports multiple selection then the callback method will need to handle the entity_type and entity_ids parameters being passed to it.
There is no plan to change this behaviour currently.

Thanks @philip.scadding for clarifying things, glad there’s no plans to change any of the existing behaviours.

I asked because of curiosity while coding, wondering if I’ll need to prepare a alternative, non-entity_type and entity_ids implementation. Just something in the back of my mind, but turns out, nothing to worry about