[Bf-blender-cvs] [2fad30ba1e4] ui-asset-view-template: Merge branch 'master' into ui-asset-view-template

Julian Eisel noreply at git.blender.org
Tue Mar 16 13:09:41 CET 2021


Commit: 2fad30ba1e4c6691998babff5c0c038b7e808c41
Author: Julian Eisel
Date:   Tue Mar 16 11:43:51 2021 +0100
Branches: ui-asset-view-template
https://developer.blender.org/rB2fad30ba1e4c6691998babff5c0c038b7e808c41

Merge branch 'master' into ui-asset-view-template

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



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

diff --cc source/blender/blenkernel/intern/cryptomatte.cc
index c8faa74c8f7,bc89fa85cea..6c7b3d82c3b
--- a/source/blender/blenkernel/intern/cryptomatte.cc
+++ b/source/blender/blenkernel/intern/cryptomatte.cc
@@@ -182,11 -216,24 +216,26 @@@ float BKE_cryptomatte_hash_to_float(uin
    return blender::bke::cryptomatte::CryptomatteHash(cryptomatte_hash).float_encoded();
  }
  
+ /* Find an ID in the given main that matches the given encoded float. */
+ bool BKE_cryptomatte_find_name(const CryptomatteSession *session,
+                                const float encoded_hash,
+                                char *r_name,
+                                int name_len)
+ {
+   std::optional<std::string> name = (*session)[encoded_hash];
+   if (!name) {
+     return false;
+   }
+ 
+   BLI_strncpy(r_name, name->c_str(), name_len);
+   return true;
+ }
+ 
  char *BKE_cryptomatte_entries_to_matte_id(NodeCryptomatte *node_storage)
  {
 -  DynStr *matte_id = BLI_dynstr_new();
 +  std::stringstream ss;
 +  ss.precision(9);
 +
    bool first = true;
    LISTBASE_FOREACH (CryptomatteEntry *, entry, &node_storage->entries) {
      if (!first) {
diff --cc source/blender/blenloader/intern/versioning_290.c
index 99d3628f3e6,06bafb20c35..9eb6206396d
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@@ -1832,22 -1852,22 +1852,39 @@@ void blo_do_versions_290(FileData *fd, 
     */
    {
      /* Keep this block, even when empty. */
+ 
+     LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+       LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+         LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+           if (sl->spacetype == SPACE_SPREADSHEET) {
+             ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
+                                                                    &sl->regionbase;
+             ARegion *new_footer = do_versions_add_region_if_not_found(
+                 regionbase, RGN_TYPE_FOOTER, "footer for spreadsheet", RGN_TYPE_HEADER);
+             if (new_footer != NULL) {
+               new_footer->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP :
+                                                                         RGN_ALIGN_BOTTOM;
+             }
+           }
+         }
+       }
+     }
    }
 +
 +  {
 +    if (!DNA_struct_elem_find(
 +            fd->filesdna, "View3D", "AssetLibraryReference", "active_asset_library")) {
 +      LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
 +        LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
 +          LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) {
 +            if (space->spacetype == SPACE_VIEW3D) {
 +              View3D *v3d = (View3D *)space;
 +              v3d->active_asset_library.type = ASSET_LIBRARY_LOCAL;
 +              v3d->active_asset_library.custom_library_index = -1;
 +            }
 +          }
 +        }
 +      }
 +    }
 +  }
  }
diff --cc source/blender/makesdna/DNA_space_types.h
index 2f243b2a4d5,dec3097a9ae..f8a9c82e791
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@@ -694,10 -697,10 +697,10 @@@ typedef enum eSpaceSeq_OverlayType 
   * custom library. Otherwise idname is not used.
   */
  typedef struct FileSelectAssetLibraryUID {
-   short type;
+   short type; /* eFileAssetLibrary_Type */
    char _pad[2];
    /**
 -   * If showing a custom asset library (#FILE_ASSET_LIBRARY_CUSTOM), this is the index of the
 +   * If showing a custom asset library (#ASSET_LIBRARY_CUSTOM), this is the index of the
     * #bUserAssetLibrary within #UserDef.asset_libraries.
     * Should be ignored otherwise (but better set to -1 then, for sanity and debugging).
     */



More information about the Bf-blender-cvs mailing list