[Bf-blender-cvs] [7748dd4ec73] temp-sculpt-colors: Merge remote-tracking branch 'origin/master' into temp-sculpt-colors

Joseph Eagar noreply at git.blender.org
Tue Apr 5 19:33:08 CEST 2022


Commit: 7748dd4ec735535f53f61d6aa4a2f6b9db9abdc1
Author: Joseph Eagar
Date:   Tue Apr 5 09:47:10 2022 -0700
Branches: temp-sculpt-colors
https://developer.blender.org/rB7748dd4ec735535f53f61d6aa4a2f6b9db9abdc1

Merge remote-tracking branch 'origin/master' into temp-sculpt-colors

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



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

diff --cc release/scripts/startup/bl_ui/space_userpref.py
index b0b618ada11,b72abeed394..035c4fd1352
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@@ -2259,9 -2259,9 +2259,8 @@@ class USERPREF_PT_experimental_new_feat
      def draw(self, context):
          self._draw_items(
              context, (
 -                ({"property": "use_sculpt_vertex_colors"}, "T71947"),
                  ({"property": "use_sculpt_tools_tilt"}, "T82877"),
                  ({"property": "use_sculpt_texture_paint"}, "T96225"),
-                 ({"property": "use_select_nearest_on_first_click"}, "T96752"),
                  ({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")),
                  ({"property": "use_override_templates"}, ("T73318", "Milestone 4")),
                  ({"property": "use_named_attribute_nodes"}, ("T91742")),
diff --cc source/blender/blenloader/intern/versioning_300.c
index 7aa2c219835,3088dc4c7e8..5ba7dc74e3d
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@@ -2552,74 -2549,23 +2552,91 @@@ void blo_do_versions_300(FileData *fd, 
      }
    }
  
-   if (!MAIN_VERSION_ATLEAST(bmain, 302, 9)) {
+   if (!MAIN_VERSION_ATLEAST(bmain, 302, 10)) {
+     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_FILE) {
+             continue;
+           }
+           SpaceFile *sfile = (SpaceFile *)sl;
+           if (sfile->browse_mode != FILE_BROWSE_MODE_ASSETS) {
+             continue;
+           }
+           sfile->asset_params->base_params.filter_id |= FILTER_ID_GR;
+         }
+       }
+     }
+   }
+ 
++  if (!MAIN_VERSION_ATLEAST(bmain, 302, 10)) {
 +    /* While vertex-colors were experimental the smear tool became corrupt due
 +     * to bugs in the wm_toolsystem API (auto-creation of sculpt brushes
 +     * was broken).  Go through and reset all smear brushes. */
 +    LISTBASE_FOREACH (Brush *, br, &bmain->brushes) {
 +      if (br->sculpt_tool == SCULPT_TOOL_SMEAR) {
 +        br->alpha = 1.0f;
 +        br->spacing = 5;
 +        br->flag &= ~BRUSH_ALPHA_PRESSURE;
 +        br->flag &= ~BRUSH_SPACE_ATTEN;
 +        br->curve_preset = BRUSH_CURVE_SPHERE;
 +      }
 +    }
 +
 +    /* Rebuild active/render color attribute references. */
 +    LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) {
 +      for (int step = 0; step < 2; step++) {
 +        CustomDataLayer *actlayer = NULL;
 +
 +        int vact1, vact2;
 +
 +        if (step) {
 +          vact1 = CustomData_get_render_layer_index(&me->vdata, CD_PROP_COLOR);
 +          vact2 = CustomData_get_render_layer_index(&me->ldata, CD_MLOOPCOL);
 +        }
 +        else {
 +          vact1 = CustomData_get_active_layer_index(&me->vdata, CD_PROP_COLOR);
 +          vact2 = CustomData_get_active_layer_index(&me->ldata, CD_MLOOPCOL);
 +        }
 +
 +        if (vact1 != -1) {
 +          actlayer = me->vdata.layers + vact1;
 +        }
 +        else if (vact2 != -1) {
 +          actlayer = me->ldata.layers + vact2;
 +        }
 +
 +        if (actlayer) {
 +          if (step) {
 +            BKE_id_attributes_render_color_set(&me->id, actlayer);
 +          }
 +          else {
 +            BKE_id_attributes_active_color_set(&me->id, actlayer);
 +          }
 +        }
 +      }
 +    }
 +
 +    /* Update data transfer modifiers */
 +    LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
 +      LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
 +        if (md->type == eModifierType_DataTransfer) {
 +          DataTransferModifierData *dtmd = (DataTransferModifierData *)md;
 +
 +          for (int i = 0; i < DT_MULTILAYER_INDEX_MAX; i++) {
 +            if (dtmd->layers_select_src[i] == 0) {
 +              dtmd->layers_select_src[i] = DT_LAYERS_ALL_SRC;
 +            }
 +
 +            if (dtmd->layers_select_dst[i] == 0) {
 +              dtmd->layers_select_dst[i] = DT_LAYERS_NAME_DST;
 +            }
 +          }
 +        }
 +      }
 +    }
 +  }
 +
    /**
     * Versioning code until next subversion bump goes here.
     *



More information about the Bf-blender-cvs mailing list