Commit: 2e5663c2c6c7447247968c585b6cd88522acfb79
Author: Campbell Barton
Date:   Wed Jan 23 16:41:40 2019 +1100
Branches: master
https://developer.blender.org/rB2e5663c2c6c7447247968c585b6cd88522acfb79

Fix T60781: DOF Distance (pick) crashes

>From own recent changes c8e75c2b00cfb7e8

===================================================================

M       source/blender/editors/interface/interface_eyedropper_depth.c

===================================================================

diff --git a/source/blender/editors/interface/interface_eyedropper_depth.c 
b/source/blender/editors/interface/interface_eyedropper_depth.c
index 1634e7c6bd4..68a93229eb5 100644
--- a/source/blender/editors/interface/interface_eyedropper_depth.c
+++ b/source/blender/editors/interface/interface_eyedropper_depth.c
@@ -111,9 +111,13 @@ static int depthdropper_init(bContext *C, wmOperator *op)
                        if (v3d->camera && v3d->camera->data && 
!ID_IS_LINKED(v3d->camera->data)) {
                                RNA_id_pointer_create(v3d->camera->data, 
&ddr->ptr);
                                ddr->prop = RNA_struct_find_property(&ddr->ptr, 
"dof_distance");
+                               ddr->is_undo = true;
                        }
                }
        }
+       else {
+               ddr->is_undo = UI_but_flag_is_set(but, UI_BUT_UNDO);
+       }
 
        if ((ddr->ptr.data == NULL) ||
            (ddr->prop == NULL) ||
@@ -125,8 +129,6 @@ static int depthdropper_init(bContext *C, wmOperator *op)
        }
        op->customdata = ddr;
 
-       ddr->is_undo = UI_but_flag_is_set(but, UI_BUT_UNDO);
-
        ddr->art = art;
        ddr->draw_handle_pixel = ED_region_draw_cb_activate(art, 
depthdropper_draw_cb, ddr, REGION_DRAW_POST_PIXEL);
        ddr->init_depth = RNA_property_float_get(&ddr->ptr, ddr->prop);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to