[Bf-blender-cvs] [176b331c43c] temp-sculpt-colors: Merge branch 'master' into temp-sculpt-colors
Joseph Eagar
noreply at git.blender.org
Tue Mar 29 08:22:14 CEST 2022
Commit: 176b331c43c5378b0a346b7c96b0934c9c5bf19f
Author: Joseph Eagar
Date: Mon Mar 28 22:54:24 2022 -0700
Branches: temp-sculpt-colors
https://developer.blender.org/rB176b331c43c5378b0a346b7c96b0934c9c5bf19f
Merge branch 'master' into temp-sculpt-colors
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_userpref.py
index 2533c993b9a,f9642a2dbb6..2eff8ca8cf6
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@@ -2259,7 -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_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 d71bfd27a7f,37a6619876d..2f6bec4061a
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@@ -2417,56 -2415,26 +2417,74 @@@ void blo_do_versions_300(FileData *fd,
}
}
}
+
+ /* Change grease pencil smooth iterations to match old results with new algorithm. */
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {
+ if (md->type == eGpencilModifierType_Smooth) {
+ SmoothGpencilModifierData *gpmd = (SmoothGpencilModifierData *)md;
+ if (gpmd->step == 1 && gpmd->factor <= 0.5f) {
+ gpmd->factor *= 2.0f;
+ }
+ else {
+ gpmd->step = 1 + (int)(gpmd->factor * max_ff(0.0f,
+ min_ff(5.1f * sqrtf(gpmd->step) - 3.0f,
+ gpmd->step + 2.0f)));
+ gpmd->factor = 1.0f;
+ }
+ }
+ }
+ }
}
+ /* rebuild active/render color attribute references*/
+ if (!MAIN_VERSION_ATLEAST(bmain, 302, 6)) {
+ LISTBASE_FOREACH (Brush *, br, &bmain->brushes) {
+ /* buggy code in wm_toolsystem broke smear in old files,
+ reset to defaults */
+ 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;
+ }
+ }
+
+ 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);
+ }
+ }
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
diff --cc source/blender/editors/object/object_bake_api.c
index 3ca91c7e652,44f05600d7d..fec87fbfa95
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@@ -1080,9 -1080,9 +1080,9 @@@ static bool bake_targets_output_vertex_
{
Mesh *me = ob->data;
MPropCol *mcol = CustomData_get_layer(&me->vdata, CD_PROP_COLOR);
- const bool mcol_valid = (mcol != NULL && U.experimental.use_sculpt_vertex_colors);
+ const bool mcol_valid = (mcol != NULL);
MLoopCol *mloopcol = CustomData_get_layer(&me->ldata, CD_MLOOPCOL);
- const int num_channels = targets->num_channels;
+ const int channels_num = targets->channels_num;
const float *result = targets->result;
if (mcol_valid) {
diff --cc source/blender/makesdna/DNA_userdef_types.h
index 94b2514d423,5fb8d0328f1..99938d711ee
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@@ -649,8 -650,9 +649,9 @@@ typedef struct UserDef_Experimental
char use_extended_asset_browser;
char use_override_templates;
char use_named_attribute_nodes;
+ char use_select_nearest_on_first_click;
char enable_eevee_next;
- char _pad[2];
- // char _pad[0];
++ char _pad[1];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;
More information about the Bf-blender-cvs
mailing list