[Bf-blender-cvs] [bdfdd9f2caf] asset-browser: Remove outdated TODO comment, comment why it's not needed instead

Julian Eisel noreply at git.blender.org
Tue Dec 1 19:23:04 CET 2020


Commit: bdfdd9f2caf0aefe8de18fb0d41d6daac4f8559a
Author: Julian Eisel
Date:   Tue Dec 1 19:22:04 2020 +0100
Branches: asset-browser
https://developer.blender.org/rBbdfdd9f2caf0aefe8de18fb0d41d6daac4f8559a

Remove outdated TODO comment, comment why it's not needed instead

===================================================================

M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index cd37c660b94..c2d89bb85dd 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2440,7 +2440,8 @@ static int rna_FileSelectParams_asset_repository_get(PointerRNA *ptr)
     return params->asset_repository.type;
   }
 
-  /* TODO check if path exists? */
+  /* Note that the path isn't checked for validity here. If an invalid repository path is used, the
+   * Asset Browser can give a nice hint on what's wrong. */
   const bUserAssetRepository *user_repository = BKE_preferences_asset_repository_find_from_name(
       &U, params->asset_repository.idname);
   const int index = BKE_preferences_asset_repository_get_index(&U, user_repository);
@@ -2467,7 +2468,8 @@ static void rna_FileSelectParams_asset_repository_set(PointerRNA *ptr, int value
   const bUserAssetRepository *user_repository = BKE_preferences_asset_repository_find_from_index(
       &U, value - FILE_ASSET_REPO_CUSTOM);
 
-  /* TODO check if path exists? */
+  /* Note that the path isn't checked for validity here. If an invalid repository path is used, the
+   * Asset Browser can give a nice hint on what's wrong. */
   const bool is_valid = (user_repository->name[0] && user_repository->path[0]);
   if (user_repository && is_valid) {
     BLI_strncpy(params->asset_repository.idname,
@@ -2503,7 +2505,8 @@ static const EnumPropertyItem *rna_FileSelectParams_asset_repository_itemf(
   int i = 0;
   for (bUserAssetRepository *user_repository = U.asset_repositories.first; user_repository;
        user_repository = user_repository->next, i++) {
-    /* TODO check if path exists? */
+    /* Note that the path itself isn't checked for validity here. If an invalid repository path is
+     * used, the Asset Browser can give a nice hint on what's wrong. */
     const bool is_valid = (user_repository->name[0] && user_repository->path[0]);
     if (!is_valid) {
       continue;



More information about the Bf-blender-cvs mailing list