[Bf-blender-cvs] [1a17c578a8a] temp_bmesh_multires: Merge branch 'master' into temp_bmesh_multires

Joseph Eagar noreply at git.blender.org
Mon Mar 1 02:05:54 CET 2021


Commit: 1a17c578a8aa565aa854f208a901a2263cd3cf41
Author: Joseph Eagar
Date:   Sun Feb 7 23:17:09 2021 -0800
Branches: temp_bmesh_multires
https://developer.blender.org/rB1a17c578a8aa565aa854f208a901a2263cd3cf41

Merge branch 'master' into temp_bmesh_multires

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



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

diff --cc release/scripts/addons
index c93dc355888,dfeb905d62a..dd01ddbe345
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit c93dc355888ec2f9a4376ad6cf0422277c69d565
 -Subproject commit dfeb905d62ae6d759d8da930f291e73505e6ca67
++Subproject commit dd01ddbe34518b8eeec5596c593c3f1d12fa0337
diff --cc source/blender/blenkernel/intern/mesh.c
index 00da1ad7770,c15484f8e72..1560e9325d5
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@@ -1008,11 -1007,10 +1008,10 @@@ BMesh *BKE_mesh_to_bmesh_ex(const Objec
                              const struct BMeshCreateParams *create_params,
                              const struct BMeshFromMeshParams *convert_params)
  {
-   BMesh *bm;
    const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(me);
  
-   bm = BM_mesh_create(&allocsize, create_params);
+   BMesh *bm = BM_mesh_create(&allocsize, create_params);
 -  BM_mesh_bm_from_me(bm, me, convert_params);
 +  BM_mesh_bm_from_me(ob, bm, me, convert_params);
  
    return bm;
  }
diff --cc source/blender/blenkernel/intern/mesh_mirror.c
index bedc6f27db5,a22b52d68d5..b45e01cb5a0
--- a/source/blender/blenkernel/intern/mesh_mirror.c
+++ b/source/blender/blenkernel/intern/mesh_mirror.c
@@@ -41,12 -41,11 +41,12 @@@
  
  #include "MOD_modifiertypes.h"
  
- Mesh *BKE_mesh_mirror_bisect_on_mirror_plane(Object *ob,
-                                              MirrorModifierData *mmd,
-                                              const Mesh *mesh,
-                                              int axis,
-                                              const float plane_co[3],
-                                              float plane_no[3])
 -Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(MirrorModifierData *mmd,
++Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(Object *ob,
++  MirrorModifierData *mmd,
+                                                           const Mesh *mesh,
+                                                           int axis,
+                                                           const float plane_co[3],
+                                                           float plane_no[3])
  {
    bool do_bisect_flip_axis = ((axis == 0 && mmd->flag & MOD_MIR_BISECT_FLIP_AXIS_X) ||
                                (axis == 1 && mmd->flag & MOD_MIR_BISECT_FLIP_AXIS_Y) ||
@@@ -159,7 -193,8 +195,8 @@@ Mesh *BKE_mesh_mirror_apply_mirror_on_a
  
    Mesh *mesh_bisect = NULL;
    if (do_bisect) {
-     mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane(ob, mmd, mesh, axis, plane_co, plane_no);
+     mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(
 -        mmd, mesh, axis, plane_co, plane_no);
++        ob, mmd, mesh, axis, plane_co, plane_no);
      mesh = mesh_bisect;
    }
  
diff --cc source/blender/editors/object/object_remesh.c
index 5d1f634d1b2,f55ce88b426..edb65b96e14
--- a/source/blender/editors/object/object_remesh.c
+++ b/source/blender/editors/object/object_remesh.c
@@@ -773,8 -775,8 +775,10 @@@ static Mesh *remesh_symmetry_bisect(Obj
        zero_v3(plane_no);
        plane_no[axis] = -1.0f;
        mesh_bisect_temp = mesh_bisect;
-       mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane(
-           ob, &mmd, mesh_bisect, axis, plane_co, plane_no);
 -      mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(
++
++      mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(ob, 
+           &mmd, mesh_bisect, axis, plane_co, plane_no);
++
        if (mesh_bisect_temp != mesh_bisect) {
          BKE_id_free(NULL, mesh_bisect_temp);
        }
diff --cc source/blender/editors/sculpt_paint/sculpt.c
index f45e4e41603,a53c2efed06..8a461cf4925
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@@ -8639,24 -8165,9 +8638,25 @@@ static bool sculpt_no_multires_poll(bCo
    return false;
  }
  
 +/* checks if pbvh needs to sync its flat vcol shading flag with scene tool settings
 +   scene and ob are allowd to be NULL (in which case nothing is done).
 +*/
 +void SCULPT_update_flat_vcol_shading(Object *ob, Scene *scene)
 +{
 +  if (!scene || !ob || !ob->sculpt || !ob->sculpt->pbvh) {
 +    return;
 +  }
 +
 +  if (ob->sculpt->pbvh) {
 +    bool flat_vcol_shading = ((scene->toolsettings->sculpt->flags &
 +                               SCULPT_DYNTOPO_FLAT_VCOL_SHADING) != 0);
 +
 +    BKE_pbvh_set_flat_vcol_shading(ob->sculpt->pbvh, flat_vcol_shading);
 +  }
 +}
  static int sculpt_symmetrize_exec(bContext *C, wmOperator *op)
  {
+   Main *bmain = CTX_data_main(C);
    Object *ob = CTX_data_active_object(C);
    const Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
    SculptSession *ss = ob->sculpt;
diff --cc source/blender/editors/sculpt_paint/sculpt_boundary.c
index 67b7a7daa36,0cfb6f17adb..004d704fd8b
--- a/source/blender/editors/sculpt_paint/sculpt_boundary.c
+++ b/source/blender/editors/sculpt_paint/sculpt_boundary.c
@@@ -716,16 -668,15 +717,17 @@@ static void do_boundary_brush_bend_task
        if (SCULPT_check_vertex_pivot_symmetry(
                orig_data.co, boundary->initial_vertex_position, symm)) {
          const float mask = vd.mask ? 1.0f - *vd.mask : 1.0f;
+         const float automask = SCULPT_automasking_factor_get(ss->cache->automasking, ss, vd.index);
          float t_orig_co[3];
 +        const int index = vd.index;
 +
          float *target_co = SCULPT_brush_deform_target_vertex_co_get(ss, brush->deform_target, &vd);
 -        sub_v3_v3v3(t_orig_co, orig_data.co, boundary->bend.pivot_positions[vd.index]);
 +        sub_v3_v3v3(t_orig_co, orig_data.co, boundary->bend.pivot_positions[index]);
          rotate_v3_v3v3fl(target_co,
                           t_orig_co,
-                          boundary->bend.pivot_rotation_axis[index],
-                          angle * boundary->edit_info[index].strength_factor * mask);
-         add_v3_v3(target_co, boundary->bend.pivot_positions[index]);
+                          boundary->bend.pivot_rotation_axis[vd.index],
+                          angle * boundary->edit_info[vd.index].strength_factor * mask * automask);
+         add_v3_v3(target_co, boundary->bend.pivot_positions[vd.index]);
        }
      }



More information about the Bf-blender-cvs mailing list