[Bf-blender-cvs] [d21701bdf3b] asset-browser: Merge branch 'asset-metadata' into asset-browser

Julian Eisel noreply at git.blender.org
Thu Nov 12 23:46:01 CET 2020


Commit: d21701bdf3b0733c2142161370763634364e47b6
Author: Julian Eisel
Date:   Thu Nov 12 23:40:00 2020 +0100
Branches: asset-browser
https://developer.blender.org/rBd21701bdf3b0733c2142161370763634364e47b6

Merge branch 'asset-metadata' into asset-browser

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



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

diff --cc source/blender/blenkernel/CMakeLists.txt
index aeb73148192,38b0066c1a5..f078ad18318
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -211,8 -211,7 +211,8 @@@ set(SR
    intern/pbvh.c
    intern/pbvh_bmesh.c
    intern/pointcache.c
-   intern/pointcloud.c
+   intern/pointcloud.cc
 +  intern/preferences.c
    intern/report.c
    intern/rigidbody.c
    intern/scene.c
diff --cc source/blender/blenloader/intern/versioning_userdef.c
index 6f32e270fec,7d7c68beb8f..44d3ef990f4
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@@ -812,15 -823,8 +824,11 @@@ void blo_do_versions_userdef(UserDef *u
     */
    {
      /* Keep this block, even when empty. */
 +    if (BLI_listbase_is_empty(&userdef->asset_repositories)) {
 +      BKE_preferences_asset_repository_default_add(userdef);
 +    }
    }
  
-   if (userdef->pixelsize == 0.0f) {
-     userdef->pixelsize = 1.0f;
-   }
- 
    LISTBASE_FOREACH (bTheme *, btheme, &userdef->themes) {
      do_versions_theme(userdef, btheme);
    }
diff --cc source/blender/blenloader/intern/writefile.c
index af0f69efe97,a28072ba4d4..9e732ac9f99
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@@ -2127,12 -934,9 +956,12 @@@ static bool write_file_handle(Main *mai
  
    write_renderinfo(wd, mainvar);
    write_thumb(wd, thumb);
 +#ifdef WITH_ASSET_REPO_INFO
 +  write_asset_repository_info(&writer, repository_info);
 +#endif
    write_global(wd, write_flags, mainvar);
  
-   /* The windowmanager and screen often change,
+   /* The window-manager and screen often change,
     * avoid thumbnail detecting changes because of this. */
    mywrite_flush(wd);
  
diff --cc source/blender/editors/space_file/filelist.c
index 11e0924e8f5,311debdf960..41841bbc38e
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@@ -308,13 -297,6 +308,10 @@@ enum 
  typedef struct FileList {
    FileDirEntryArr filelist;
  
 +  eFileSelectType type;
 +  /* The repository this list was created for. Stored here so we know when to re-read. */
 +  FileSelectAssetRepositoryID asset_repository;
 +
-   short prv_w;
-   short prv_h;
- 
    short flags;
  
    short sort;
diff --cc source/blender/editors/space_file/filesel.c
index ad7f725a072,15c6972c5f5..eaf1250a247
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@@ -409,13 -328,9 +411,14 @@@ short ED_fileselect_set_params(SpaceFil
    return 1;
  }
  
 +bool ED_fileselect_is_asset_browser(const FileSelectParams *params)
 +{
 +  return (params->browse_mode == FILE_BROWSE_MODE_ASSETS);
 +}
 +
- /* The subset of FileSelectParams.flag items we store into preferences. */
- #define PARAMS_FLAGS_REMEMBERED (FILE_HIDE_DOT | FILE_SORT_INVERT)
+ /* The subset of FileSelectParams.flag items we store into preferences. Note that FILE_SORT_ALPHA
+  * may also be remembered, but only conditionally. */
+ #define PARAMS_FLAGS_REMEMBERED (FILE_HIDE_DOT)
  
  void ED_fileselect_window_params_get(const wmWindow *win, int win_size[2], bool *is_maximized)
  {
diff --cc source/blender/makesdna/DNA_space_types.h
index 2c0078a655e,07facd7eaf8..32038a63c44
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@@ -786,33 -764,15 +788,39 @@@ typedef struct SpaceFile 
    short systemnr, system_bookmarknr;
  } SpaceFile;
  
 +/* SpaceFile.browse_mode (File Space Browsing Mode) */
 +typedef enum eFileBrowse_Mode {
 +  /* Regular Blender File Browser */
 +  FILE_BROWSE_MODE_FILES = 0,
 +  /* Asset Browser */
 +  FILE_BROWSE_MODE_ASSETS = 1,
 +} eFileBrowse_Mode;
 +
 +typedef enum eFileAssetReporitory_Type {
 +  /* For the future. Display assets bundled with Blender by default. */
 +  // FILE_ASSET_REPO_BUNDLED = 0,
 +  /** Display assets from the current session (current "Main"). */
 +  FILE_ASSET_REPO_LOCAL = 1,
 +  /* For the future. Display assets for the current project. */
 +  // FILE_ASSET_REPO_PROJECT = 2,
 +
 +  /** Display assets from custom asset repositories, as defined in the preferences
 +   * (#bUserAssetRepository). The name will be taken from #FileSelectParams.asset_repository.idname
 +   * then.
 +   * In RNA, we add the index of the custom repository to this to identify it by index. So keep
 +   * this last! */
 +  FILE_ASSET_REPO_CUSTOM = 100,
 +} eFileAssetReporitory_Type;
 +
  /* FileSelectParams.display */
  enum eFileDisplayType {
+   /** Internal (not exposed to users): Keep whatever display type was used during the last File
+    * Browser use, or the default if no such record is found. Use this unless there's a good reason
+    * to set a specific display type. */
    FILE_DEFAULTDISPLAY = 0,
+ 
+   /* User selectable choices. */
+ 
    FILE_VERTICALDISPLAY = 1,
    FILE_HORIZONTALDISPLAY = 2,
    FILE_IMGDISPLAY = 3,



More information about the Bf-blender-cvs mailing list