Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 6 Sep 2018 04:42:59 +0000 (14:42 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 6 Sep 2018 04:43:47 +0000 (14:43 +1000)
intern/cycles/render/mesh.cpp
source/blender/editors/space_view3d/view3d_gizmo_ruler.c
source/blender/editors/space_view3d/view3d_ruler.c

index ade575a52d6e0ce00452dd07c0614c49fb4d8760..8a00b88af123306063d2b4c244421e78c4a42c40 100644 (file)
@@ -2162,10 +2162,9 @@ void MeshManager::device_update(Device *device, DeviceScene *dscene, Scene *scen
                                num_bvh++;
                        }
                }
-       }
 
-       /* TODO: properly handle cancel halfway displacement */
-       if(progress.get_cancel()) return;
+               if(progress.get_cancel()) return;
+       }
 
        /* Device re-update after displacement. */
        if(displacement_done) {
index 1fe9a2b1632a8b6d6f35915cc79beb946acddc70..d7a605eca5e3d4ffc262e756bc8dd9355945f1e7 100644 (file)
@@ -577,7 +577,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz)
                        float quat[4];
                        float axis[3];
                        float angle;
-                       const float px_scale = (ED_view3d_pixel_size(rv3d, ruler_item->co[1]) *
+                       const float px_scale = (ED_view3d_pixel_size_no_ui_scale(rv3d, ruler_item->co[1]) *
                                                min_fff(arc_size,
                                                        len_v2v2(co_ss[0], co_ss[1]) / 2.0f,
                                                        len_v2v2(co_ss[2], co_ss[1]) / 2.0f));
index 904fddf9bf6625415fbfd739e19ddd036989d764..b31faa73c63fe10b07ab0d38fd8e7f8189cc4ac5 100644 (file)
@@ -491,7 +491,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
                                float quat[4];
                                float axis[3];
                                float angle;
-                               const float px_scale = (ED_view3d_pixel_size(rv3d, ruler_item->co[1]) *
+                               const float px_scale = (ED_view3d_pixel_size_no_ui_scale(rv3d, ruler_item->co[1]) *
                                                        min_fff(arc_size,
                                                                len_v2v2(co_ss[0], co_ss[1]) / 2.0f,
                                                                len_v2v2(co_ss[2], co_ss[1]) / 2.0f));