[Bf-blender-cvs] [6ccfeae9b14] sculpt-dev: Merge branch 'master' into sculpt-dev

Joseph Eagar noreply at git.blender.org
Sat Dec 11 10:43:27 CET 2021


Commit: 6ccfeae9b14f76b0de2701e2294967e9e690c920
Author: Joseph Eagar
Date:   Sat Dec 11 01:43:14 2021 -0800
Branches: sculpt-dev
https://developer.blender.org/rB6ccfeae9b14f76b0de2701e2294967e9e690c920

Merge branch 'master' into sculpt-dev

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



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

diff --cc release/datafiles/startup.blend
index bf8b9386694,fe142d7de7e..0ce69c12de1
Binary files differ
diff --cc source/blender/blenkernel/BKE_brush.h
index 06271e51ea2,a0f3733588a..c15a6ad8916
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@@ -135,18 -168,15 +182,20 @@@ void BKE_brush_alpha_set(struct Scene *
  float BKE_brush_weight_get(const struct Scene *scene, const struct Brush *brush);
  void BKE_brush_weight_set(const struct Scene *scene, struct Brush *brush, float value);
  
 -bool BKE_brush_use_locked_size(const struct Scene *scene, const struct Brush *brush);
 -bool BKE_brush_use_alpha_pressure(const struct Brush *brush);
 -bool BKE_brush_use_size_pressure(const struct Brush *brush);
 -
 +bool BKE_brush_use_locked_size(const struct Scene *scene,
 +                               const struct Brush *brush,
 +                               bool use_channels);
 +bool BKE_brush_use_alpha_pressure(const struct ToolSettings *ts,
 +                                  const struct Brush *brush,
 +                                  bool use_channels);
 +bool BKE_brush_use_size_pressure(const struct ToolSettings *ts,
 +                                 const struct Brush *brush,
 +                                 bool use_channels);
  bool BKE_brush_sculpt_has_secondary_color(const struct Brush *brush);
  
- /* scale unprojected radius to reflect a change in the brush's 2D size */
+ /**
+  * Scale unprojected radius to reflect a change in the brush's 2D size.
+  */
  void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
                                          int new_brush_size,
                                          int old_brush_size);
diff --cc source/blender/blenkernel/BKE_customdata.h
index 1aedf1f2b28,68d29235469..14176d748a6
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@@ -103,12 -109,13 +109,15 @@@ bool CustomData_layer_has_interp(const 
   */
  bool CustomData_has_math(const struct CustomData *data);
  bool CustomData_has_interp(const struct CustomData *data);
+ /**
+  * A non bmesh version would have to check `layer->data`.
+  */
  bool CustomData_bmesh_has_free(const struct CustomData *data);
  
 +bool CustomData_layout_is_same(const struct CustomData *_a, const struct CustomData *_b);
 +
  /**
-  * Checks if any of the customdata layers is referenced.
+  * Checks if any of the custom-data layers is referenced.
   */
  bool CustomData_has_referenced(const struct CustomData *data);
  
@@@ -143,12 -158,10 +160,14 @@@ void CustomData_copy(const struct Custo
  /* BMESH_TODO, not really a public function but readfile.c needs it */
  void CustomData_update_typemap(struct CustomData *data);
  
 +/* copies all customdata layers without allocating data,
 + * and without respect to type masks or NO_COPY/etc flags*/
 +void CustomData_copy_all_layout(const struct CustomData *source, struct CustomData *dest);
 +
- /* same as the above, except that this will preserve existing layers, and only
-  * add the layers that were not there yet */
+ /**
+  * Same as the above, except that this will preserve existing layers, and only
+  * add the layers that were not there yet.
+  */
  bool CustomData_merge(const struct CustomData *source,
                        struct CustomData *dest,
                        CustomDataMask mask,
@@@ -456,23 -527,30 +543,38 @@@ void CustomData_from_bmesh_block(const 
  void CustomData_file_write_info(int type, const char **r_struct_name, int *r_struct_num);
  int CustomData_sizeof(int type);
  
- /* get the name of a layer type */
+ /**
+  * Get the name of a layer type.
+  */
  const char *CustomData_layertype_name(int type);
+ /**
+  * Can only ever be one of these.
+  */
  bool CustomData_layertype_is_singleton(int type);
+ /**
+  * Has dynamically allocated members.
+  * This is useful to know if operations such as #memcmp are
+  * valid when comparing data from two layers.
+  */
  bool CustomData_layertype_is_dynamic(int type);
+ /**
+  * \return Maximum number of layers of given \a type, -1 means 'no limit'.
+  */
  int CustomData_layertype_layers_max(const int type);
  
- /* make sure the name of layer at index is unique */
+ /**
+  * Make sure the name of layer at index is unique.
+  */
  void CustomData_set_layer_unique_name(struct CustomData *data, int index);
  
 +/* get unique layer name for a layer that doesn't currently exist */
 +void CustomData_find_unique_layer_name(CustomData *data,
 +                                       int type,
 +                                       const char *name,
 +                                       char *outname);
 +
 +/* try to find layer with name name; if it does not exist,
 +   load the active layer name into outname*/
  void CustomData_validate_layer_name(const struct CustomData *data,
                                      int type,
                                      const char *name,
@@@ -486,14 -569,14 +593,20 @@@ bool CustomData_verify_versions(struct 
  void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int totloop);
  void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int total);
  void CustomData_bmesh_update_active_layers(struct CustomData *fdata, struct CustomData *ldata);
+ /**
+  * Update active indices for active/render/clone/stencil custom data layers
+  * based on indices from fdata layers
+  * used by do_versions in `readfile.c` when creating pdata and ldata for pre-bmesh
+  * meshes and needed to preserve active/render/clone/stencil flags set in pre-bmesh files.
+  */
  void CustomData_bmesh_do_versions_update_active_layers(struct CustomData *fdata,
                                                         struct CustomData *ldata);
 +
 +void CustomData_bmesh_init_pool_ex(CustomData *data,
 +                                   int totelem,
 +                                   const char htype,
 +                                   const char *memtag);
 +
  void CustomData_bmesh_init_pool(struct CustomData *data, int totelem, const char htype);
  
  #ifndef NDEBUG
diff --cc source/blender/blenkernel/BKE_mesh_mapping.h
index c958d01a849,acc1628de1d..2d3a9dd8c31
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@@ -93,7 -93,7 +93,11 @@@ 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 struct MLoop *mloop,
                                         const struct MLoopUV *mloopuv,
@@@ -105,28 -105,35 +109,40 @@@
  UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
  void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
  
 -/**
 - * 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.
 - */
 -void BKE_mesh_vert_poly_map_create(MeshElemMap **r_map,
 -                                   int **r_mem,
 -                                   const struct MPoly *mpoly,
 -                                   const struct MLoop *mloop,
 -                                   int totvert,
 -                                   int totpoly,
 -                                   int totloop);
+ /**
+  * Generates a map where the key is the vertex and the value
+  * is a list of loops that use that vertex as a corner.
+  * The lists are allocated from one memory pool.
+  */
 -void BKE_mesh_vert_loop_map_create(MeshElemMap **r_map,
 -                                   int **r_mem,
 -                                   const struct MPoly *mpoly,
 -                                   const struct MLoop *mloop,
 -                                   int totvert,
 -                                   int totpoly,
 -                                   int totloop);
 +void BKE_mesh_vert_poly_map_create(
 +    MeshElemMap **r_map,
 +    int **r_mem,
 +    const struct MVert *mvert,  // only needed if sort_disk_cycles is true
 +    const struct MEdge *medge,  // only needed if sort_disk_cycles is true
 +    const struct MPoly *mpoly,
 +    const struct MLoop *mloop,
 +    int totvert,
 +    int totpoly,
 +    int totloop,
 +    const bool sort_disk_cycles);  // put polys in sorted geometric order
++    
+ /**
+  * Generates a map where the key is the edge and the value
+  * is a list of looptris that use that edge.
+  * The lists are allocated from one memory pool.
+  */
 +void BKE_mesh_vert_loop_map_create(
 +    MeshElemMap **r_map,
 +    int **r_mem,
 +    const struct MVert *mvert,  // only needed if sort_disk_cycles is true
 +    const struct MEdge *medge,  // only needed if sort_disk_cycles is true
 +    const struct MPoly *mpoly,
 +    const struct MLoop *mloop,
 +    int totvert,
 +    int totpoly,
 +    int totloop,
 +    const bool sort_disk_cycles);  // put loops in sorted geometric order
++
  void BKE_mesh_vert_looptri_map_create(MeshElemMap **r_map,
                                        int **r_mem,
                                        const struct MVert *mvert,
@@@ -135,16 -142,24 +151,27 @@@
                                        const int totlooptri,
                                        const struct MLoop *mloop,
                                        const int totloop);
+ /**
+  * Generates a map where the key is the vertex and the value
+  * is a list of edges that use that vertex as an endpoint.
+  * The lists are allocated from one memory pool.
+  */
  void BKE_mesh_vert_edge_map_create(
 -    MeshElemMap **r_map, int **r_mem, const struct MEdge *medge, int totvert, int totedge);
 -/**
 - * A version of #BKE_mesh_vert_edge_map_create that references connected vertices directly
 - * (not their edges).
 - */
 +    MeshElemMap **r_map,
 +    int **r_mem,
 +    const struct MVert *mvert,  // only needed if sort_disk_cycles is true
 +    const struct MEdge *medge,
 +    int totvert,
 +    int toted

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list