Fix #119716: snap in curve editing when mesh is generated by Geometry Nodes
In these cases, the Mesh is defined as an instance of the object. These instances need to be ignored when in edit mode.
This commit is contained in:
@@ -899,6 +899,12 @@ static eSnapMode snap_obj_fn(SnapObjectContext *sctx,
|
||||
}
|
||||
|
||||
if (GS(ob_data->name) == ID_ME) {
|
||||
if (ob_eval->type == OB_CURVES_LEGACY && BKE_object_is_in_editmode(ob_eval)) {
|
||||
/* Sometimes, such as when Mesh is generated by Geometry Nodes, a Curve object may have Mesh
|
||||
* instances.
|
||||
* In these cases, skip the snap to Mesh if the Curve is in edit mode. */
|
||||
return SCE_SNAP_TO_NONE;
|
||||
}
|
||||
return snap_object_mesh(sctx, ob_eval, ob_data, obmat, sctx->runtime.snap_to_flag, use_hide);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user