[Bf-blender-cvs] [5218391701b] master: Fix assertion in UV path select
Campbell Barton
noreply at git.blender.org
Fri Jan 20 12:34:02 CET 2023
Commit: 5218391701b7a49f24c93078994aa44d82e1c1c2
Author: Campbell Barton
Date: Fri Jan 20 22:29:07 2023 +1100
Branches: master
https://developer.blender.org/rB5218391701b7a49f24c93078994aa44d82e1c1c2
Fix assertion in UV path select
Existing path selection & new path picking included without UV's.
Now limit objects to those with UV's.
Also remove use of CTX_wm_view3d(C) in the UV editor it would be NULL,
but it doesn't makes sense to use the 3D viewport for UV operations
even if it was available.
===================================================================
M source/blender/editors/uvedit/uvedit_path.c
===================================================================
diff --git a/source/blender/editors/uvedit/uvedit_path.c b/source/blender/editors/uvedit/uvedit_path.c
index e8ba3b0cffd..00d86fef831 100644
--- a/source/blender/editors/uvedit/uvedit_path.c
+++ b/source/blender/editors/uvedit/uvedit_path.c
@@ -562,8 +562,8 @@ static int uv_shortest_path_pick_invoke(bContext *C, wmOperator *op, const wmEve
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
uint objects_len = 0;
- Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(
- scene, view_layer, CTX_wm_view3d(C), &objects_len);
+ Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(
+ scene, view_layer, NULL, &objects_len);
float co[2];
@@ -796,8 +796,8 @@ static int uv_shortest_path_select_exec(bContext *C, wmOperator *op)
ViewLayer *view_layer = CTX_data_view_layer(C);
uint objects_len = 0;
- Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(
- scene, view_layer, CTX_wm_view3d(C), &objects_len);
+ Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(
+ scene, view_layer, NULL, &objects_len);
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
More information about the Bf-blender-cvs
mailing list