[Bf-blender-cvs] [84342ed7b23] sculpt-dev: Merge remote-tracking branch 'origin' into sculpt-dev

Joseph Eagar noreply at git.blender.org
Tue Sep 20 19:53:17 CEST 2022


Commit: 84342ed7b23ba7d1a4774a1ee9991034187b68dd
Author: Joseph Eagar
Date:   Sat Sep 17 17:58:13 2022 -0700
Branches: sculpt-dev
https://developer.blender.org/rB84342ed7b23ba7d1a4774a1ee9991034187b68dd

Merge remote-tracking branch 'origin' into sculpt-dev

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



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

diff --cc .clang-format
index 3ac4016629e,72add4594a4..7552a9da193
--- a/.clang-format
+++ b/.clang-format
@@@ -265,8 -265,8 +265,9 @@@ ForEachMacros
    - SET_SLOT_PROBING_BEGIN
    - MAP_SLOT_PROBING_BEGIN
    - VECTOR_SET_SLOT_PROBING_BEGIN
 +  - TGSET_ITER
    - WL_ARRAY_FOR_EACH
+   - FOREACH_SPECTRUM_CHANNEL
  
  StatementMacros:
    - PyObject_HEAD
diff --cc intern/ghost/CMakeLists.txt
index 2915234d3da,aa23618ca39..66f50f17fb1
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@@ -561,9 -532,4 +532,7 @@@ if(WITH_XR_OPENXR
    unset(XR_PLATFORM_DEFINES)
  endif()
  
- add_definitions(${GL_DEFINITIONS})
- 
 +remove_cc_flag("-fsanitize=address")
 +remove_cc_flag("/fsanitize=address")
 +
  blender_add_lib(bf_intern_ghost "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --cc release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 7339a255f65,20021762d5a..fa0b4e38203
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@@ -1733,12 -1700,15 +1733,12 @@@ class _defs_image_generic
  
      @ToolDef.from_fn
      def cursor():
 -        return dict(
 -            idname="builtin.cursor",
 +        return dict(idname="builtin.cursor",
              label="Cursor",
 -            description=(
 -                "Set the cursor location, drag to transform"
 -            ),
 +            description=("Set the cursor location, drag to transform"),
              icon="ops.generic.cursor",
              keymap=(),
-             options={'KEYMAP_FALLBACK'},)
+         )
  
      # Currently a place holder so we can switch away from the annotation tool.
      # Falls back to default image editor action.
@@@ -1889,9 -1881,10 +1889,9 @@@ class _defs_image_uv_sculpt
                  if brush is None:
                      return
                  radius = brush.size
-             draw_circle_2d(xy, (1.0,) * 4, radius, segments=32)
+             draw_circle_2d(xy, (1.0,) * 4, radius)
  
 -        return generate_from_enum_ex(
 -            context,
 +        return generate_from_enum_ex(context,
              idname_prefix="builtin_brush.",
              icon_prefix="brush.uv_sculpt.",
              type=bpy.types.Brush,
@@@ -2462,12 -2530,15 +2462,12 @@@ class _defs_sequencer_generic
  
      @ToolDef.from_fn
      def cursor():
 -        return dict(
 -            idname="builtin.cursor",
 +        return dict(idname="builtin.cursor",
              label="Cursor",
 -            description=(
 -                "Set the cursor location, drag to transform"
 -            ),
 +            description=("Set the cursor location, drag to transform"),
              icon="ops.generic.cursor",
              keymap="Sequencer Tool: Cursor",
-             options={'KEYMAP_FALLBACK'},)
+         )
  
      @ToolDef.from_fn
      def blade():
diff --cc source/blender/blenfont/intern/blf_font.c
index eb974f33994,eaea88be9ae..9934d5a35c4
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@@ -1483,13 -1634,25 +1634,25 @@@ bool blf_font_size(FontBLF *font, floa
    size = (float)ft_size / 64.0f;
  
    if (font->size != size || font->dpi != dpi) {
-     if (FT_Set_Char_Size(font->face, 0, ft_size, dpi, dpi) == FT_Err_Ok) {
-       font->size = size;
-       font->dpi = dpi;
+     if (font->flags & BLF_CACHED) {
+       FTC_ScalerRec scaler = {0};
+       scaler.face_id = font;
+       scaler.width = 0;
+       scaler.height = ft_size;
+       scaler.pixel = 0;
+       scaler.x_res = dpi;
+       scaler.y_res = dpi;
+       if (FTC_Manager_LookupSize(ftc_manager, &scaler, &font->ft_size) != FT_Err_Ok) {
+         return false;
+       }
+       font->ft_size->generic.data = (void *)font;
+       font->ft_size->generic.finalizer = blf_size_finalizer;
      }
      else {
-       printf("The current font does not support the size, %f and DPI, %u\n", size, dpi);
-       return false;
 -      if (FT_Set_Char_Size(font->face, 0, ft_size, dpi, dpi) != FT_Err_Ok) {
++      if (FT_Set_Char_Size(font->face, 0, (FT_F26Dot6)ft_size, dpi, dpi) != FT_Err_Ok) {
+         return false;
+       }
+       font->ft_size = font->face->size;
      }
    }
  
diff --cc source/blender/blenkernel/BKE_bassrelief.h
index 0e549e75a76,00000000000..c116f584404
mode 100644,000000..100644
--- a/source/blender/blenkernel/BKE_bassrelief.h
+++ b/source/blender/blenkernel/BKE_bassrelief.h
@@@ -1,89 -1,0 +1,89 @@@
 +/*
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version 2
 + * of the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software Foundation,
 + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + *
 + * The Original Code is Copyright (C) Blender Foundation.
 + * All rights reserved.
 + */
 +#pragma once
 +
 +/** \file
 + * \ingroup bke
 + */
 +
 +#include "BKE_bvhutils.h"
 +#include "BLI_bitmap.h"
 +#include "BLI_math_matrix.h"
 +
 +struct Scene;
 +struct Mesh;
 +struct BassReliefModifierData;
 +struct Object;
 +struct MDeformVert;
 +struct ModifierEvalContext;
 +struct MPropCol;
 +
 +#define MAX_BASSRELIEF_DEBUG_COLORS 7
 +
 +#ifdef __cplusplus
 +extern "C" {
 +#endif
 +
 +/* Information about a mesh and BVH tree. */
 +typedef struct BassReliefTreeData {
 +  Mesh *mesh;
 +
 +  BVHTree *bvh;
 +  BVHTreeFromMesh treeData;
 +  struct SpaceTransform transform;
 +  float keepDist;
 +
 +  float (*pnors)[3];
 +  float (*clnors)[3];
 +} BassReliefTreeData;
 +
 +void bassReliefModifier_deform(struct BassReliefModifierData *smd,
 +                               const struct ModifierEvalContext *ctx,
 +                               struct Scene *scene,
 +                               struct Object *ob,
 +                               struct Mesh *mesh,
-                                struct MDeformVert *dvert,
++                               const struct MDeformVert *dvert,
 +                               const int defgrp_index,
 +                               float (*vertexCos)[3],
 +                               int numVerts,
 +                               struct MPropCol *debugColors[MAX_BASSRELIEF_DEBUG_COLORS]);
 +
 +/*
 + * NULL initializes to local data
 + */
 +#define NULL_BassReliefCalcData \
 +  { \
 +    NULL, \
 +  }
 +#define NULL_BVHTreeFromMesh \
 +  { \
 +    NULL, \
 +  }
 +#define NULL_BVHTreeRayHit \
 +  { \
 +    NULL, \
 +  }
 +#define NULL_BVHTreeNearest \
 +  { \
 +    0, \
 +  }
 +
 +#ifdef __cplusplus
 +}
 +#endif
diff --cc source/blender/blenkernel/BKE_mesh.h
index 567b3973308,ef57c9a2e0e..a21206f5cb4
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@@ -6,12 -6,16 +6,20 @@@
   * \ingroup bke
   */
  
 +#include "BKE_attribute.h"
 +#include "BKE_customdata.h"
 +#include "BKE_mesh_types.h"
++
  #include "BLI_compiler_attrs.h"
+ #include "BLI_compiler_compat.h"
  #include "BLI_utildefines.h"
  
+ #include "DNA_mesh_types.h"
+ #include "DNA_meshdata_types.h"
+ 
+ #include "BKE_customdata.h"
+ #include "BKE_mesh_types.h"
+ 
  struct BLI_Stack;
  struct BMesh;
  struct BMeshCreateParams;
diff --cc source/blender/blenkernel/BKE_mesh_mapping.h
index 7d1ff7e8332,cf9763d50a4..f27106038c6
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@@ -75,12 -90,9 +90,13 @@@ typedef struct MeshElemMap 
    int count;
  } MeshElemMap;
  
 -/* mapping */
 +/**
 + * Generates a map where the key is the vertex and the value
 + * is a list of polys that use that vertex as a corner.
 + * The lists are allocated from one memory pool.
 + */
  UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly,
+                                        const bool *hide_poly,
                                         const struct MLoop *mloop,
                                         const struct MLoopUV *mloopuv,
                                         unsigned int totpoly,
diff --cc source/blender/blenkernel/BKE_mesh_remesh_voxel.h
index a3c1e8d2a5a,d9f5a75ca61..34ce8d6cebf
--- a/source/blender/blenkernel/BKE_mesh_remesh_voxel.h
+++ b/source/blender/blenkernel/BKE_mesh_remesh_voxel.h
@@@ -27,20 -27,10 +27,20 @@@ struct Mesh *BKE_mesh_remesh_quadriflow
                                          void (*update_cb)(void *, float progress, int *cancel),
                                          void *update_cb_data);
  
 +struct Mesh *BKE_mesh_remesh_instant_meshes(const Mesh *input_mesh,
 +                                            int target_faces,
 +                                            int iterations,
 +                                            void (*update_cb)(void *, float progress, int *cancel),
 +                                            void *update_cb_data);
 +
  /* Data reprojection functions */
- void BKE_mesh_remesh_reproject_paint_mask(struct Mesh *target, struct Mesh *source);
+ void BKE_mesh_remesh_reproject_paint_mask(struct Mesh *target, const struct Mesh *source);
  void BKE_remesh_reproject_vertex_paint(struct Mesh *target, const struct Mesh *source);
- void BKE_remesh_reproject_sculpt_face_sets(struct Mesh *target, struct Mesh *source);
- void BKE_remesh_reproject_materials(struct Mesh *target, struct Mesh *source);
+ void BKE_remesh_reproject_sculpt_face_sets(struct Mesh *target, const struct Mesh *source);
++void BKE_remesh_reproject_materials(struct Mesh *target, const struct Mesh *source);
 +void BKE_mesh_remesh_sculpt_array_update(struct Object *ob,
 +                                         struct Mesh *target,
 +                                         struct Mesh *source);
  
  #ifdef __cplusplus
  }
diff --cc source/blender/blenkernel/BKE_paint.h
index 0f02891896d,5728b29e8a5..255c2974e65
--- a/so

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list