Skip to content
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

added 'additional_publish_fields' as an app setting #72

Open
wants to merge 1 commit 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
9 changes: 9 additions & 0 deletions info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ configuration:
allows_empty: True
default_value: []

additional_publish_fields:
type: list
description: "Additional fields to be queried on the PublishedFile entity, which will be available for the
loader items to use"
values:
type: str
allows_empty: True
default_value: []


# this app works in all engines - it does not contain
# any host application specific commands
Expand Down
3 changes: 2 additions & 1 deletion python/tk_multi_loader/model_latestpublish.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ def _do_load_data(self, sg_filters, treeview_folder_items):
else:
self._publish_type_field = "tank_type"

publish_fields = [self._publish_type_field] + constants.PUBLISHED_FILES_FIELDS
publish_fields = [self._publish_type_field] + constants.PUBLISHED_FILES_FIELDS \
+ app.get_setting("additional_publish_fields")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line over-indented for visual indent


# first add our folders to the model
# make gc happy by keeping handle to all items
Expand Down
2 changes: 1 addition & 1 deletion python/tk_multi_loader/model_publishhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def load_data(self, sg_data):
publish_type_field = "tank_type"

# fields to pull down
fields = [publish_type_field] + constants.PUBLISHED_FILES_FIELDS
fields = [publish_type_field] + constants.PUBLISHED_FILES_FIELDS + app.get_setting("additional_publish_fields")

# when we filter out which other publishes are associated with this one,
# to effectively get the "version history", we look for items
Expand Down