[Bf-blender-cvs] [9b00338ed47] asset-shelf: Merge branch 'master' into asset-shelf

Julian Eisel noreply at git.blender.org
Tue Jan 17 16:25:29 CET 2023


Commit: 9b00338ed47c755921aef19e419d4802c47d929b
Author: Julian Eisel
Date:   Mon Jan 16 17:22:56 2023 +0100
Branches: asset-shelf
https://developer.blender.org/rB9b00338ed47c755921aef19e419d4802c47d929b

Merge branch 'master' into asset-shelf

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



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

diff --cc source/blender/blenloader/intern/versioning_300.cc
index 2acc95b7339,4c45e1433ab..19f075241af
--- a/source/blender/blenloader/intern/versioning_300.cc
+++ b/source/blender/blenloader/intern/versioning_300.cc
@@@ -3733,25 -3818,99 +3818,118 @@@ void blo_do_versions_300(FileData *fd, 
        }
      }
  
-     /* Add a properties sidebar to the spreadsheet editor. */
+     LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
+       if (ntree->type == NTREE_GEOMETRY) {
+         version_geometry_nodes_primitive_uv_maps(*ntree);
+       }
+     }
+   }
+ 
+   if (!MAIN_VERSION_ATLEAST(bmain, 305, 6)) {
+     LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+       LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+         LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+           if (sl->spacetype == SPACE_VIEW3D) {
+             View3D *v3d = (View3D *)sl;
+             v3d->overlay.flag |= int(V3D_OVERLAY_SCULPT_SHOW_MASK |
+                                      V3D_OVERLAY_SCULPT_SHOW_FACE_SETS);
+           }
+         }
+       }
+     }
+   }
+ 
+   if (!MAIN_VERSION_ATLEAST(bmain, 305, 7)) {
+     LISTBASE_FOREACH (Light *, light, &bmain->lights) {
+       light->radius = light->area_size;
+     }
+     /* Grease Pencil Build modifier:
+      * Set default value for new natural draw-speed factor and maximum gap. */
+     if (!DNA_struct_elem_find(fd->filesdna, "BuildGpencilModifierData", "float", "speed_fac") ||
+         !DNA_struct_elem_find(fd->filesdna, "BuildGpencilModifierData", "float", "speed_maxgap")) {
+       LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+         LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {
+           if (md->type == eGpencilModifierType_Build) {
+             BuildGpencilModifierData *mmd = (BuildGpencilModifierData *)md;
+             mmd->speed_fac = 1.2f;
+             mmd->speed_maxgap = 0.5f;
+           }
+         }
+       }
+     }
+   }
+ 
+   if (!MAIN_VERSION_ATLEAST(bmain, 305, 8)) {
+     const int CV_SCULPT_SELECTION_ENABLED = (1 << 1);
+     LISTBASE_FOREACH (Curves *, curves_id, &bmain->hair_curves) {
+       curves_id->flag &= ~CV_SCULPT_SELECTION_ENABLED;
+     }
+     LISTBASE_FOREACH (Curves *, curves_id, &bmain->hair_curves) {
+       BKE_id_attribute_rename(&curves_id->id, ".selection_point_float", ".selection", nullptr);
+       BKE_id_attribute_rename(&curves_id->id, ".selection_curve_float", ".selection", nullptr);
+     }
+ 
+     /* Toggle the Invert Vertex Group flag on Armature modifiers in some cases. */
+     LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+       bool after_armature = false;
+       LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
+         if (md->type == eModifierType_Armature) {
+           ArmatureModifierData *amd = (ArmatureModifierData *)md;
+           if (amd->multi) {
+             /* Toggle the invert vertex group flag on operational Multi Modifier entries. */
+             if (after_armature && amd->defgrp_name[0]) {
+               amd->deformflag ^= ARM_DEF_INVERT_VGROUP;
+             }
+           }
+           else {
+             /* Disabled multi modifiers don't reset propagation, but non-multi ones do. */
+             after_armature = false;
+           }
+           /* Multi Modifier is only valid and operational after an active Armature modifier. */
+           if (md->mode & (eModifierMode_Realtime | eModifierMode_Render)) {
+             after_armature = true;
+           }
+         }
+         else if (ELEM(md->type, eModifierType_Lattice, eModifierType_MeshDeform)) {
+           /* These modifiers will also allow a following Multi Modifier to work. */
+           after_armature = (md->mode & (eModifierMode_Realtime | eModifierMode_Render)) != 0;
+         }
+         else {
+           after_armature = false;
+         }
+       }
+     }
+   }
+ 
+   /**
+    * Versioning code until next subversion bump goes here.
+    *
+    * \note Be sure to check when bumping the version:
+    * - "versioning_userdef.c", #blo_do_versions_userdef
+    * - "versioning_userdef.c", #do_versions_theme
+    *
+    * \note Keep this message at the bottom of the function.
+    */
+   {
+     /* 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_VIEW3D) {
 +            ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
 +                                                                   &sl->regionbase;
 +            ARegion *new_asset_shelf = do_versions_add_region_if_not_found(
 +                regionbase,
 +                RGN_TYPE_ASSET_SHELF,
 +                "asset shelf for view3d (versioning)",
 +                RGN_TYPE_UI);
 +            if (new_asset_shelf != nullptr) {
 +              new_asset_shelf->alignment = RGN_ALIGN_BOTTOM;
 +              new_asset_shelf->flag |= RGN_FLAG_HIDDEN;
 +            }
 +          }
 +        }
 +      }
 +    }
    }
  }
diff --cc source/blender/editors/space_file/filelist.cc
index 44f846f8595,22986672650..7447f5d7986
--- a/source/blender/editors/space_file/filelist.cc
+++ b/source/blender/editors/space_file/filelist.cc
@@@ -855,19 -854,12 +854,13 @@@ static bool is_filtered_asset(FileListI
  }
  
  static bool is_filtered_lib_type(FileListInternEntry *file,
-                                  const char *root,
+                                  const char * /*root*/,
                                   FileListFilter *filter)
  {
-   if (root) {
-     char path[FILE_MAX_LIBEXTRA], dir[FILE_MAX_LIBEXTRA], *group, *name;
- 
-     BLI_path_join(path, sizeof(path), root, file->relpath);
- 
-     if (BLO_library_path_explode(path, dir, &group, &name)) {
-       return is_filtered_id_file_type(file, group, name, filter);
-     }
+   if (file->typeflag & FILE_TYPE_BLENDERLIB) {
+     return is_filtered_id_file_type(file, file->blentype, file->name, filter);
    }
 +
    return is_filtered_file_type(file, filter);
  }



More information about the Bf-blender-cvs mailing list