Though it has been available for long, I just found that the in the setting of tk-multi-loader2, the entities field supports “Hierarchy” mode apart from the traditional “Query” mode. Here is the default values of entities field:
What’s the difference between “Hierarchy” mode and “Query” mode? Do they serve the same / different objectives? Any difference in terms of performance? I can’t find detailed explanation in its document.
Thanks for your reply. What I’m asking is the entities field, whereas “Hierarchy” is one of the acceptable option in the entities.type file. Here is a complete setting of tk-multi-loader2:
The two modes do serve different functions. The main difference is that the Hierarchy type can show multiple entity types under the root whereas the Query type is restricted to a specific entity type. So if you use the Hierarchy type as shown in the info.yml, you would get a top level item for your project, then under that you would have both assets and shots.
This is not possible with the Query type. Your query must specify an entity_type which can be either Asset or Shot so you’d have to have two separate tabs to show both.
There are also other differences. With the Hierarchy mode you cannot specify filters or dictate the hierarchy of the tree view as you can with the Query type. When using the Hierarchy type the tree view’s structure uses the entity hierarchy from your Shotgun site. Also, the only supported root value for the Hierarchy type is {context.project} at the moment.
So basically, if you want a single tab to show all the assets and shots that belong to a project, you should use the Hierarchy type. Otherwise the Query type is the way to go.
I looked into this a bit more and found a couple of known issues with the Hierarchy setup that you should be aware of.
It works as expected when your entity’s hierarchy has exactly two levels (like sequence > shot) but it breaks if you use a hierarchy with more or less levels (for example if you use sequence > type > shot). We have internal tickets on the issues, but for now if you’re using the Hierarchy method make sure your entities have exactly 2 levels.