Fix T50008: camera DOF Distance picking from W key menu not working.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 12 Nov 2016 21:29:49 +0000 (22:29 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 12 Nov 2016 21:31:24 +0000 (22:31 +0100)
source/blender/editors/interface/interface_eyedropper.c

index 31598a44b0968aa4217ff99af3fe6ea508d7ff99..d7f06b7db13e1f07c8af7e9c5f8fd93be1ee39ed 100644 (file)
@@ -1083,6 +1083,15 @@ static int depthdropper_poll(bContext *C)
                        return 1;
                }
        }
+       else  {
+               RegionView3D *rv3d = CTX_wm_region_view3d(C);
+               if (rv3d && rv3d->persp == RV3D_CAMOB) {
+                       View3D *v3d = CTX_wm_view3d(C);
+                       if (v3d->camera && v3d->camera->data && !ID_IS_LINKED_DATABLOCK(v3d->camera->data)) {
+                               return 1;
+                       }
+               }
+       }
 
        return 0;
 }