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.
This commit is contained in:
parent
127eb2e328
commit
5218391701
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue