@@ -263,23 +263,26 @@ def update_paths(self, file_path=None):
263263 :return:
264264 """
265265
266+ valid_update = False
267+ converted_file_paths = list ()
268+
266269 if not MAYA_AVAILBLE :
267270 logger .warning ('Convert Paths functionality is only available if Maya instance is running!' )
268- return False
271+ return valid_update , converted_file_paths
269272
270273 if not file_path :
271274 file_path = dcc .scene_name ()
272275
273276 if not file_path or not os .path .isfile (file_path ):
274277 logger .warning ('Given file to parse does not exists! Skipping convert paths process' .format (file_path ))
275- return False
278+ return valid_update , converted_file_paths
276279
277280 file_ext = os .path .splitext (file_path )[- 1 ]
278281 if file_ext not in dcc .extensions ():
279282 logger .warning (
280283 'Given file path has an invalid extension: {}. Supported extensions: {}' .format (
281284 file_ext , dcc .extensions ()))
282- return False
285+ return valid_update , converted_file_paths
283286
284287 if file_path != dcc .scene_name ():
285288 dcc .open_scene (file_path , save = True )
@@ -288,7 +291,7 @@ def update_paths(self, file_path=None):
288291 dirs = cmds .filePathEditor (query = True , listDirectories = '' )
289292 if not dirs :
290293 logger .debug ('File "{}" has no paths to update!' .format (dirs ))
291- return False
294+ return valid_update , converted_file_paths
292295
293296 valid_update = True
294297
@@ -299,12 +302,11 @@ def update_paths(self, file_path=None):
299302 except Exception as exc :
300303 logger .error (
301304 'Querying scene files in dir "{}" looking for dependent files: {}' .format (dir_name , exc ))
302- return
305+ return valid_update , converted_file_paths
303306 if not file_path_editor :
304307 continue
305308 file_path_editors [dir_name ] = file_path_editor
306309
307- converted_file_paths = list ()
308310 for dir_name , file_path_editor in file_path_editors .items ():
309311 if not api .is_artella_path (dir_name ):
310312 continue
0 commit comments