Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py5
-rw-r--r--source/blender/blenkernel/intern/pbvh.c13
-rw-r--r--source/blender/blenloader/intern/versioning_280.c9
-rw-r--r--source/blender/editors/mesh/editmesh_mask_extract.c4
4 files changed, 25 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index a2c477bd6f1..6f3dae9e01c 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -714,7 +714,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.operator("object.multires_rebuild_subdiv", text="Rebuild Subdivisions")
col.prop(md, "uv_smooth", text="")
col.prop(md, "show_only_control_edges")
- col.prop(md, "use_creases")
+
+ row = col.row()
+ row.enabled = not have_displacement
+ row.prop(md, "use_creases")
layout.separator()
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index f72ecd568e2..b65089c7599 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -2155,7 +2155,11 @@ static bool pbvh_faces_node_raycast(PBVH *bvh,
float location[3] = {0.0f};
madd_v3_v3v3fl(location, ray_start, ray_normal, *depth);
for (int j = 0; j < 3; j++) {
- if (len_squared_v3v3(location, co[j]) < len_squared_v3v3(location, nearest_vertex_co)) {
+ /* Always assign nearest_vertex_co in the first iteration to avoid comparison against
+ * uninitialized values. This stores the closest vertex in the current intersecting
+ * triangle. */
+ if (j == 0 ||
+ len_squared_v3v3(location, co[j]) < len_squared_v3v3(location, nearest_vertex_co)) {
copy_v3_v3(nearest_vertex_co, co[j]);
*r_active_vertex_index = mloop[lt->tri[j]].v;
*r_active_face_index = lt->poly;
@@ -2235,8 +2239,11 @@ static bool pbvh_grids_node_raycast(PBVH *bvh,
const int y_it[4] = {0, 0, 1, 1};
for (int j = 0; j < 4; j++) {
- if (len_squared_v3v3(location, co[j]) <
- len_squared_v3v3(location, nearest_vertex_co)) {
+ /* Always assign nearest_vertex_co in the first iteration to avoid comparison against
+ * uninitialized values. This stores the closest vertex in the current intersecting
+ * quad. */
+ if (j == 0 || len_squared_v3v3(location, co[j]) <
+ len_squared_v3v3(location, nearest_vertex_co)) {
copy_v3_v3(nearest_vertex_co, co[j]);
*r_active_vertex_index = gridkey->grid_area * grid_index +
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 4261682a17c..91c07d810b7 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -5217,5 +5217,14 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/
{
/* Keep this block, even when empty. */
+
+ /* Reset the cloth mass to 1.0 in brushes with an invalid value. */
+ for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
+ if (br->sculpt_tool == SCULPT_TOOL_CLOTH) {
+ if (br->cloth_mass == 0.0f) {
+ br->cloth_mass = 1.0f;
+ }
+ }
+ }
}
}
diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c
index 225776a452b..eed2cbcce39 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -67,10 +67,10 @@ static bool paint_mask_extract_poll(bContext *C)
return false;
}
else {
- return true;
+ return ED_operator_object_active_editable_mesh(C);
}
}
- return ED_operator_object_active_editable_mesh(C);
+ return false;
}
static int paint_mask_extract_exec(bContext *C, wmOperator *op)