[Bf-blender-cvs] [9a77a920f0f] sculpt-dev: Merge branch 'master' into sculpt-dev

Joseph Eagar noreply at git.blender.org
Sun Dec 5 07:51:13 CET 2021


Commit: 9a77a920f0fa098d71242b05182680b18970083a
Author: Joseph Eagar
Date:   Sat Dec 4 20:07:32 2021 -0800
Branches: sculpt-dev
https://developer.blender.org/rB9a77a920f0fa098d71242b05182680b18970083a

Merge branch 'master' into sculpt-dev

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



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

diff --cc intern/guardedalloc/MEM_guardedalloc.h
index 120fae215c3,874abb88ff5..44b58c39e76
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@@ -78,15 -78,10 +78,16 @@@ extern short (*MEM_testN)(void *vmemh)
  
  /**
   * Duplicates a block of memory, and returns a pointer to the
-  * newly allocated block. */
+  * newly allocated block.
+  * NULL-safe; will return NULL when receiving a NULL pointer. */
  extern void *(*MEM_dupallocN)(const void *vmemh) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
  
 +/**
 + * Duplicates a block of memory, and returns a pointer to the
 + * newly allocated block. */
 +extern void *(*MEM_dupallocN_id)(const void *vmemh,
 +                                 const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
 +
  /**
   * Reallocates a block of memory, and returns pointer to the newly
   * allocated block, the old one is freed. this is not as optimized
diff --cc release/datafiles/locale
index 9d270fd007f,8ee2942570f..3a78acbab9f
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 9d270fd007f628b23ccbcbd87caa2dc35286b26a
 -Subproject commit 8ee2942570f08d10484bb2328d0d1b0aaaa0367c
++Subproject commit 3a78acbab9f63b18e93c1fa72b68a85e1bdeba05
diff --cc release/scripts/addons
index 996ff7f8693,f2a08d80ccd..a444e8cc19a
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 996ff7f869357823867e3b02542418852e85aabd
 -Subproject commit f2a08d80ccd3c13af304525778df3905f95bd44d
++Subproject commit a444e8cc19a4353ce35ecdec9bb7894ee73a204a
diff --cc release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index c32ee75adf0,889155f1858..8f6596c1e52
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@@ -2744,21 -3145,19 +2744,18 @@@ class SEQUENCER_PT_tools_active(ToolSel
              _defs_sequencer_generic.transform,
              None,
              _defs_sequencer_generic.sample,
-             *_tools_annotate,],
-         'SEQUENCER': [*_tools_select,
-             _defs_sequencer_generic.blade,],
-         'SEQUENCER_PREVIEW': [*_tools_select,
-             _defs_sequencer_generic.cursor,
-             None,
-             _defs_sequencer_generic.translate,
-             _defs_sequencer_generic.rotate,
-             _defs_sequencer_generic.scale,
-             _defs_sequencer_generic.transform,
+             *_tools_annotate,
+         ],
+         'SEQUENCER': [
+             *_tools_select,
+             _defs_sequencer_generic.blade,
+         ],
+         'SEQUENCER_PREVIEW': [
+             *_tools_select,
              None,
-             _defs_sequencer_generic.sample,
              *_tools_annotate,
              None,
 -            _defs_sequencer_generic.blade,
 -        ],
 +            _defs_sequencer_generic.blade,],
      }
  
  
diff --cc release/scripts/startup/bl_ui/space_userpref.py
index 520680e3f76,4976834dd87..7afb58568f5
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@@ -1830,15 -1860,14 +1830,10 @@@ class USERPREF_PT_addons(AddOnPanel, Pa
          prefs = context.preferences
          used_ext = {ext.module for ext in prefs.addons}
  
 -        addon_user_dirs = tuple(
 -            p for p in (
 -                os.path.join(prefs.filepaths.script_directory, "addons"),
 -                bpy.utils.user_resource('SCRIPTS', path="addons"),
 -            )
 -            if p
 -        )
 +        addon_user_dirs = tuple(p for p in (os.path.join(prefs.filepaths.script_directory, "addons"),
 +                bpy.utils.user_resource('SCRIPTS', path="addons"),)
 +            if p)
  
-         # Development option for 2.8x, don't show users bundled addons
-         # unless they have been updated for 2.8x.
-         # Developers can turn them on with '--debug'
-         show_official_27x_addons = bpy.app.debug
- 
          # collect the categories that can be filtered on
          addons = [
              (mod, addon_utils.module_bl_info(mod))
@@@ -1902,15 -1937,13 +1897,9 @@@
                  is_visible = is_visible and is_enabled
  
              if is_visible:
 -                if search and not (
 -                        (search in info["name"].lower()) or
 -                        (info["author"] and (search in info["author"].lower())) or
 -                        ((filter == "All") and (search in info["category"].lower()))
 -                ):
 +                if search and not ((search in info["name"].lower()) or (info["author"] and (search in info["author"].lower())) or ((filter == "All") and (search in info["category"].lower()))):
                      continue
  
-                 # Skip 2.7x add-ons included with Blender, unless in debug
-                 # mode.
-                 is_addon_27x = info.get("blender", (0,)) < (2, 80)
-                 if (is_addon_27x and (not show_official_27x_addons) and (not mod.__file__.startswith(addon_user_dirs))):
-                     continue
- 
                  # Addon UI Code
                  col_box = col.column()
                  box = col_box.box()
diff --cc source/blender/blenkernel/intern/brush.c
index 3f6f28bcb2c,e92dd8a5ace..d4dea14b3e5
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@@ -33,11 -33,10 +33,12 @@@
  
  #include "BLT_translation.h"
  
+ #include "BKE_bpath.h"
  #include "BKE_brush.h"
 +#include "BKE_brush_engine.h"
  #include "BKE_colortools.h"
  #include "BKE_context.h"
 +#include "BKE_curvemapping_cache.h"
  #include "BKE_gpencil.h"
  #include "BKE_icons.h"
  #include "BKE_idtype.h"
@@@ -237,12 -217,16 +238,20 @@@ static void brush_foreach_id(ID *id, Li
    BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data, BKE_texture_mtex_foreach_id(data, &brush->mtex));
    BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data,
                                            BKE_texture_mtex_foreach_id(data, &brush->mask_mtex));
 +
 +  if (brush->channels) {
 +    /* TODO: deal with textures once they've been moved into the brush channel system */
 +  }
  }
  
+ static void brush_foreach_path(ID *id, BPathForeachPathData *bpath_data)
+ {
+   Brush *brush = (Brush *)id;
+   if (brush->icon_filepath[0] != '\0') {
+     BKE_bpath_foreach_path_fixed_process(bpath_data, brush->icon_filepath);
+   }
+ }
+ 
  static void brush_blend_write(BlendWriter *writer, ID *id, const void *id_address)
  {
    Brush *brush = (Brush *)id;
@@@ -2862,14 -2485,8 +2873,14 @@@ float BKE_brush_curve_strength_ex(int c
    return strength;
  }
  
 +/* Uses the brush curve control to find a strength value */
 +float BKE_brush_curve_strength(const Brush *br, float p, const float len)
 +{
 +  return BKE_brush_curve_strength_ex(br->curve_preset, br->curve, p, len);
 +}
 +
  /* Uses the brush curve control to find a strength value between 0 and 1 */
- float BKE_brush_curve_strength_clamped(Brush *br, float p, const float len)
+ float BKE_brush_curve_strength_clamped(const Brush *br, float p, const float len)
  {
    float strength = BKE_brush_curve_strength(br, p, len);
  
diff --cc source/blender/blenkernel/intern/mesh.cc
index 60754a83b45,c367602f037..dab762b3204
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@@ -48,7 -48,7 +48,8 @@@
  #include "BLT_translation.h"
  
  #include "BKE_anim_data.h"
 +#include "BKE_attribute.h"
+ #include "BKE_bpath.h"
  #include "BKE_deform.h"
  #include "BKE_editmesh.h"
  #include "BKE_global.h"
diff --cc source/blender/blenkernel/intern/scene.c
index ff2512c6c45,f2ac6b7fd22..46bf9411c9d
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@@ -71,7 -71,7 +71,8 @@@
  #include "BKE_anim_data.h"
  #include "BKE_animsys.h"
  #include "BKE_armature.h"
 +#include "BKE_brush_engine.h"
+ #include "BKE_bpath.h"
  #include "BKE_cachefile.h"
  #include "BKE_collection.h"
  #include "BKE_colortools.h"
diff --cc source/blender/blenlib/intern/BLI_mempool.c
index 1a12c3cc1a4,bd6a124c7cb..ecfa2544eb9
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@@ -149,11 -126,7 +149,11 @@@ struct BLI_mempool 
    uint flag;
    /* keeps aligned to 16 bits */
  
 +#ifdef HAVE_MEMPOOL_ASAN
 +  char poisoned[256];
 +#endif
 +
-   /** Free element list. Interleaved into chunk datas. */
+   /** Free element list. Interleaved into chunk data. */
    BLI_freenode *free;
    /** Use to know how many chunks to keep for #BLI_mempool_clear. */
    uint maxchunks;
diff --cc source/blender/blenloader/intern/versioning_300.c
index 0f473ed2778,49b44d40d79..00dc77582d5
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@@ -2228,473 -2445,5 +2502,466 @@@ void blo_do_versions_300(FileData *fd, 
     */
    {
      /* Keep this block, even when empty. */
- 
-     FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
-       if (ntree->type != NTREE_CUSTOM) {
-         version_node_tree_socket_id_delim(ntree);
-       }
-     }
-     FOREACH_NODETREE_END;
    }
 +
 +  if (!MAIN_VERSION_ATLEAST(bmain, 300, 24)) {
 +    LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
 +      // load old brush settings into channels
 +      if (brush->channels) {
 +        BKE_brush_channelset_free(brush->channels);
 +        brush->channels = NULL;
 +      }
 +
 +      BKE_brush_builtin_create(brush, brush->sculpt_tool);
 +      BKE_brush_channelset_compat_load(brush->channels, brush, true);
 +    }
 +  }
 +
 +  if (!MAIN_VERSION_ATLEAST(bmain, 300, 32)) {
 +    LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
 +      BKE_brush_channelset_ui_init(brush, brush->sculpt_tool);
 +
 +      if (ELEM(brush->sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS) && brush->channels) {
 +        BRUSHSET_SET_BOOL(brush->channels, autosmooth_use_spacing, true);
 +        BRUSHSET_SET_FLOAT(brush->channels, autosmooth_spacing, 7.0f);
 +
 +        BRUSHSET_LOOKUP(brush->channels, radius)->mappings[BRUSH_MAPPING_PRESSURE].flag =
 +            BRUSH_MAPPING_ENABLED;
 +        BRUSHSET_LOOKUP(brush->channels, 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list