Skip to content

Commit

Permalink
Post dependencies functions are only applied to retrived dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoveda committed Sep 18, 2020
1 parent 1960daf commit 3f3cb61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion artella/plugins/getdependencies/getdependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class GetDependenciesPlugin(plugin.ArtellaPlugin, object):
def __init__(self, config_dict=None, manager=None):
super(GetDependenciesPlugin, self).__init__(config_dict=config_dict, manager=manager)

@utils.timestamp
def get_dependencies(self, file_path=None, recursive=True, update_paths=False, show_dialogs=True):
"""
Returns all dependency files of the given file path and downloads to the latest available version those files
Expand Down Expand Up @@ -172,7 +173,8 @@ def _get_dependencies(deps_file_path, parent_path=None, found_files=None):
files_to_update = list(set(files_to_update))
artella.DccPlugin().update_paths(files_to_update, show_dialogs=show_dialogs, call_post_function=False)

self._post_get_dependencies()
files_updated = [path for path in files_to_download if path and os.path.isfile(path)]
self._post_get_dependencies(files_updated=files_updated)

artella.DccPlugin().show_success_message(
'Get Dependencies operation was successful!', title='Get Depedendencies')
Expand Down
6 changes: 4 additions & 2 deletions artella/plugins/getdependencies/maya/getdependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ def _post_get_dependencies(self, **kwargs):
plugins.
"""

maya_utils.reload_textures()
maya_utils.reload_dependencies()
files_updated = kwargs.get('files_updated', list())

maya_utils.reload_textures(files_updated)
maya_utils.reload_dependencies(files_updated)

0 comments on commit 3f3cb61

Please sign in to comment.