Merge branch 'blender-v4.1-release'

This commit is contained in:
Germano Cavalcante
2024-02-21 10:32:36 -03:00
2 changed files with 8 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_object.hh"
#include "ED_screen.hh"
#include "DNA_array_utils.hh"
@@ -199,6 +200,12 @@ static bool bake_simulation_poll(bContext *C)
CTX_wm_operator_poll_msg_set(C, "File must be saved before baking");
return false;
}
Object *ob = ED_object_active_context(C);
const bool use_frame_cache = ob->flag & OB_FLAG_USE_SIMULATION_CACHE;
if (!use_frame_cache) {
CTX_wm_operator_poll_msg_set(C, "Cache has to be enabled");
return false;
}
return true;
}

View File

@@ -279,7 +279,7 @@ eSnapMode SnapData::snap_edge_points_impl(SnapObjectContext *sctx,
if (lambda < (range) || (1.0f - range) < lambda) {
int v_id = lambda < 0.5f ? 0 : 1;
if (this->snap_point(v_pair[v_id], v_id)) {
if (this->snap_point(v_pair[v_id], vindex[v_id])) {
elem = SCE_SNAP_TO_EDGE_ENDPOINT;
this->copy_vert_no(vindex[v_id], this->nearest_point.no);
}