Skip to content

resolve publish filters #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/tk_multi_loader/model_latestpublish.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import datetime
from . import utils, constants
from . import model_item_data
from .utils import resolve_filters

# import the shotgun_model module from the shotgun utils framework
shotgun_model = sgtk.platform.import_framework("tk-framework-shotgunutils", "shotgun_model")
Expand Down Expand Up @@ -174,6 +175,8 @@ def load_data(self, item, child_folders, show_sub_items, additional_sg_filters):
# to the main entity filters before getting publishes from shotgun. This may be stuff
# like 'only status approved'
pub_filters = app.get_setting("publish_filters", [])
# resolve the filters so context properties can be used
pub_filters = resolve_filters(pub_filters)
sg_filters.extend(pub_filters)

# now, on top of that, apply any session specific filters
Expand Down
1 change: 1 addition & 0 deletions python/tk_multi_loader/model_publishhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def load_data(self, sg_data):
# add external filters from config
app = sgtk.platform.current_bundle()
pub_filters = app.get_setting("publish_filters", [])
pub_filters = utils.resolve_filters(pub_filters)
filters.extend(pub_filters)

ShotgunModel._load_data(self,
Expand Down