[Bf-blender-cvs] [49bd2228cb5] temp_bmesh_multires: Merge branch 'master' into temp_bmesh_multires

Joseph Eagar noreply at git.blender.org
Tue Dec 8 22:39:18 CET 2020


Commit: 49bd2228cb56a958ce04ec05758bb90832c9cd54
Author: Joseph Eagar
Date:   Mon Dec 7 13:04:19 2020 -0800
Branches: temp_bmesh_multires
https://developer.blender.org/rB49bd2228cb56a958ce04ec05758bb90832c9cd54

Merge branch 'master' into temp_bmesh_multires

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



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

diff --cc release/datafiles/locale
index 975b8892711,1c0e9c29fd3..9e40c01dffd
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 975b889271128f712fbdc4b509605cc1094fcde4
 -Subproject commit 1c0e9c29fd33963ff42ff9252a64016abda8d2a7
++Subproject commit 9e40c01dffd3f720b23b906d20df8e999d34a4af
diff --cc release/scripts/addons
index 7ab48791aaf,7faa6b379fd..c93dc355888
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 7ab48791aafcfb705b54d6dff44004d2edef6a8d
 -Subproject commit 7faa6b379fd818b8af8cf8279ff9f43cbdbb169e
++Subproject commit c93dc355888ec2f9a4376ad6cf0422277c69d565
diff --cc source/blender/blenloader/intern/versioning_290.c
index f51770e7541,956cf1aee8a..739704ce0ea
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@@ -1128,15 -1171,66 +1171,76 @@@ void blo_do_versions_290(FileData *fd, 
      }
    }
  
 +  if (!MAIN_VERSION_ATLEAST(bmain, 293, 0)) {
 +    for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
 +      if (br->sculpt_tool == SCULPT_TOOL_VCOL_BOUNDARY) {
 +        if (br->vcol_boundary_exponent == 0.0f) {
 +          br->vcol_boundary_exponent = 1.0f;
 +        }
 +      }
 +    }
 +  }
++  
+   if (!MAIN_VERSION_ATLEAST(bmain, 292, 5)) {
+     /* Initialize the opacity of the overlay wireframe */
+     if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "wireframe_opacity")) {
+       for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+         LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+           LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+             if (sl->spacetype == SPACE_VIEW3D) {
+               View3D *v3d = (View3D *)sl;
+               v3d->overlay.wireframe_opacity = 1.0f;
+             }
+           }
+         }
+       }
+     }
+ 
+     /* Replace object hidden filter with inverted object visible filter.  */
+     LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+       LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+         LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) {
+           if (space->spacetype == SPACE_OUTLINER) {
+             SpaceOutliner *space_outliner = (SpaceOutliner *)space;
+             if (space_outliner->filter_state == SO_FILTER_OB_HIDDEN) {
+               space_outliner->filter_state = SO_FILTER_OB_VISIBLE;
+               space_outliner->filter |= SO_FILTER_OB_STATE_INVERSE;
+             }
+           }
+         }
+       }
+     }
+ 
+     LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+       LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
+         if (md->type == eModifierType_WeightVGProximity) {
+           WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *)md;
+           if (wmd->cmap_curve == NULL) {
+             wmd->cmap_curve = BKE_curvemapping_add(1, 0.0, 0.0, 1.0, 1.0);
+             BKE_curvemapping_init(wmd->cmap_curve);
+           }
+         }
+       }
+     }
+ 
+     /* Hair and PointCloud attributes names. */
+     LISTBASE_FOREACH (Hair *, hair, &bmain->hairs) {
+       do_versions_point_attribute_names(&hair->pdata);
+     }
+     LISTBASE_FOREACH (PointCloud *, pointcloud, &bmain->pointclouds) {
+       do_versions_point_attribute_names(&pointcloud->pdata);
+     }
+ 
+     /* Cryptomatte render pass */
+     if (!DNA_struct_elem_find(fd->filesdna, "ViewLayer", "short", "cryptomatte_levels")) {
+       LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+         LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
+           view_layer->cryptomatte_levels = 6;
+           view_layer->cryptomatte_flag = VIEW_LAYER_CRYPTOMATTE_ACCURATE;
+         }
+       }
+     }
+   }
  
    /**
     * Versioning code until next subversion bump goes here.
diff --cc source/blender/draw/intern/draw_cache.c
index 1d1f82cebec,921164c73a7..5e96151f9ab
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@@ -474,45 -484,30 +485,64 @@@ static void sphere_lat_lon_vert(GPUVert
    (*v_ofs)++;
  }
  
 +void DRW_make_cdlayer_attr_aliases(GPUVertFormat *format, char *base_name, CustomData *data, CustomDataLayer *cl)
 +{
 +  char attr_name[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
 +  const char *layer_name = cl->name;
 +
 +  int i = (int) (cl - data->typemap[cl->type]);
 +
 +  GPU_vertformat_safe_attr_name(layer_name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
 +
 +  /* UV layer name. */
 +  BLI_snprintf(attr_name, sizeof(attr_name), "%s%s", base_name, attr_safe_name);
 +  GPU_vertformat_alias_add(format, attr_name);
 +
 +  /* Auto layer name. */
 +  BLI_snprintf(attr_name, sizeof(attr_name), "a%s", attr_safe_name);
 +  GPU_vertformat_alias_add(format, attr_name);
 +
 +  /* Active render layer name. */
 +  if (i == CustomData_get_render_layer(data, cl->type)) {
 +    GPU_vertformat_alias_add(format, base_name);
 +  }
 +  /* Active display layer name. */
 +  if (i == CustomData_get_active_layer(data, cl->type)) {
 +    BLI_snprintf(attr_name, sizeof(attr_name), "a%s", base_name);
 +    GPU_vertformat_alias_add(format, attr_name);
 +  }
 +
 +  /* Stencil mask uv layer name. */
 +  if (i == CustomData_get_stencil_layer(data, cl->type)) {
 +    BLI_snprintf(attr_name, sizeof(attr_name), "m%s", base_name);
 +    GPU_vertformat_alias_add(format, attr_name);
 +  }
 +}
 +
- GPUBatch *DRW_cache_sphere_get(void)
+ GPUBatch *DRW_cache_sphere_get(const eDRWLevelOfDetail level_of_detail)
  {
-   if (!SHC.drw_sphere) {
-     const int lat_res = 32;
-     const int lon_res = 24;
+   BLI_assert(level_of_detail >= DRW_LOD_LOW && level_of_detail < DRW_LOD_MAX);
+ 
+   if (!SHC.drw_sphere_lod[level_of_detail]) {
+     int lat_res;
+     int lon_res;
+ 
+     switch (level_of_detail) {
+       case DRW_LOD_LOW:
+         lat_res = DRW_SPHERE_SHAPE_LATITUDE_LOW;
+         lon_res = DRW_SPHERE_SHAPE_LONGITUDE_LOW;
+         break;
+       case DRW_LOD_MEDIUM:
+         lat_res = DRW_SPHERE_SHAPE_LATITUDE_MEDIUM;
+         lon_res = DRW_SPHERE_SHAPE_LONGITUDE_MEDIUM;
+         break;
+       case DRW_LOD_HIGH:
+         lat_res = DRW_SPHERE_SHAPE_LATITUDE_HIGH;
+         lon_res = DRW_SPHERE_SHAPE_LONGITUDE_HIGH;
+         break;
+       default:
+         return NULL;
+     }
  
      GPUVertFormat format = extra_vert_format();
      GPU_vertformat_attr_add(&format, "nor", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
diff --cc source/blender/editors/sculpt_paint/sculpt.c
index 9c85ad2e2a9,b9427677745..dd654b41ffa
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@@ -9732,9 -9207,9 +9736,9 @@@ static int sculpt_mask_by_color_invoke(
    mouse[1] = event->mval[1];
    SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false);
  
-   SCULPT_undo_push_begin("Mask by color");
+   SCULPT_undo_push_begin(ob, "Mask by color");
  
 -  const int active_vertex = SCULPT_active_vertex_get(ss);
 +  const SculptVertRef active_vertex = SCULPT_active_vertex_get(ss);
    const float threshold = RNA_float_get(op->ptr, "threshold");
    const bool invert = RNA_boolean_get(op->ptr, "invert");
    const bool preserve_mask = RNA_boolean_get(op->ptr, "preserve_previous_mask");
diff --cc source/blender/editors/sculpt_paint/sculpt_face_set.c
index 958049c2ec8,ad42750bb92..14c6ac5f6fd
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@@ -132,10 -134,9 +135,12 @@@ static void do_draw_face_sets_brush_tas
    SculptBrushTestFn sculpt_brush_test_sq_fn = SCULPT_brush_test_init_with_falloff_shape(
        ss, &test, data->brush->falloff_shape);
    const int thread_id = BLI_task_parallel_thread_id(tls);
 +  const int active_fset = abs(ss->cache->paint_face_set);
 +
 +  MVert *mvert = SCULPT_mesh_deformed_mverts_get(ss);
  
+   MVert *mvert = SCULPT_mesh_deformed_mverts_get(ss);
+ 
    BKE_pbvh_vertex_iter_begin(ss->pbvh, data->nodes[n], vd, PBVH_ITER_UNIQUE)
    {
      if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES) {
diff --cc source/blender/editors/sculpt_paint/sculpt_intern.h
index 4c24a857c16,99ee22328ea..57a0a47df97
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@@ -1103,19 -1093,10 +1114,19 @@@ void SCULPT_cache_calc_brushdata_symm(S
                                        const float angle);
  void SCULPT_cache_free(StrokeCache *cache);
  
 +void SCULPT_orig_vert_data_init(SculptOrigVertData *data,
 +                                Object *ob,
 +                                PBVHNode *node,
 +                                SculptUndoType type);
 +void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter);
 +void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data,
 +                                      Object *ob,
 +                                      struct SculptUndoNode *unode);
 +
  SculptUndoNode *SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type);
 -SculptUndoNode *SCULPT_undo_get_node(PBVHNode *node);
 +SculptUndoNode *SCULPT_undo_get_node(PBVHNode *node, SculptUndoType type);
  SculptUndoNode *SCULPT_undo_get_first_node(void);
- void SCULPT_undo_push_begin(const char *name);
+ void SCULPT_undo_push_begin(struct Object *ob, const char *name);
  void SCULPT_undo_push_end(void);
  void SCULPT_undo_push_end_ex(const bool use_nested_undo);
  
diff --cc source/blender/makesdna/DNA_brush_types.h
index 10b0f51809b,50aac69da19..3af9bc230c9
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@@ -871,12 -873,13 +876,13 @@@ typedef enum eBrushUVSculptTool 
          SCULPT_TOOL_THUMB, \
          SCULPT_TOOL_LAYER, \
          SCULPT_TOOL_DISPLACEMENT_ERASER, \
 -        SCULPT_TOOL_DRAW_SHARP, \
          SCULPT_TOOL_SLIDE_RELAX, \
          SCULPT_TOOL_ELASTIC_DEFORM, \
+         SCULPT_TOOL_BOUNDARY, \
          SCULPT_TOOL_POSE, \
 -        SCULPT_TOOL_DRAW_FACE_SETS, \
          SCULPT_TOOL_PAINT, \
 +        SCULPT_TOOL_VCOL_BOUNDARY, \
 +        SCULPT_TOOL_DRAW_FACE_SETS, \
         

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list