Skip to content

Multiselection and hierarchical Tag entity support#64

Open
reformstudios wants to merge 4 commits intoshotgunsoftware:masterfrom
reformstudios:multiselect_tag_entity_tab
Open

Multiselection and hierarchical Tag entity support#64
reformstudios wants to merge 4 commits intoshotgunsoftware:masterfrom
reformstudios:multiselect_tag_entity_tab

Conversation

@reformstudios
Copy link

The purpose of this pull request is to allow studios to use the Tag system to browse a media/asset library.

Two major updates to tk-multi-loader2 were required to achieve this.

  • Allow multiselection in the tree-view. (along with various updates to functions to support list items rather than single items)
  • Add support for the 'name' field of 'Tag' entities.

No additional entities are required, but a new field for Tag entities should be added to allow a hierarchy to be formed. The field should be called 'Parent Tag' (or 'sg_parent_tag' in code). It allows you to group tags under other tags to create hierarchies and to organise tags by type or purpose.
For the purpose of a studio library, a new Tag should be created to be the root Tag for the library tag hierarchy; eg 'Library Tag'.

To add a Tag tab to your loader UI, use the following entry in your loader2 config.

entities:
        - caption: Asset Library
          hierarchy: [sg_parent_tag, name]
          entity_type: Tag
          publish_filters:
          - [project, is, {type: Project, id: 90}] # THIS ID SHOULD POINT TO THE PROJECT HOLDING YOUR STUDIO LIBRARY MEDIA/ASSETS.
          filters:
          - [sg_parent_tag.Tag.sg_parent_tag, is, {type: Tag, id: 374}] # THIS ID SHOULD POINT TO THE 'LIBRARY TAG' THAT YOU CREATED PREVIOUSLY.

You can then create a hierarchy of new Tags that define the top groupings of tag for your library. These should all have their parent sent to the 'library tag' tag. The hierarchy can only be 1 level deep currently
eg.

  • Type
    • 2D Element
    • 3D Asset
    • Texture
  • Subject
    • Blood
    • Dust
    • Bubbles
    • Debris
    • MuzzleFlash
  • Style
    • explosion
    • backfire
    • spurt
    • splatter
    • demolition
  • Vehicle
    • Car
    • Bus
    • Spaceship
  • Location
    • London
    • Paris
    • New York
    • Desert
    • Space
      ... etc

The multiselection behaviour in the tree is Toggle behaviour, with each additional item selected narrowing down the number of published items displayed in the right-hand panel. This allows users to use an arbitrary number and type of tags to hone in on relevant search results.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants