Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_eyedropper_depth.c
| Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | static void depthdropper_depth_sample_pt( | ||||
| ARegion *ar_prev = CTX_wm_region(C); | ARegion *ar_prev = CTX_wm_region(C); | ||||
| ddr->name[0] = '\0'; | ddr->name[0] = '\0'; | ||||
| if (sa) { | if (sa) { | ||||
| if (sa->spacetype == SPACE_VIEW3D) { | if (sa->spacetype == SPACE_VIEW3D) { | ||||
| ARegion *ar = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my); | ARegion *ar = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my); | ||||
| if (ar) { | if (ar) { | ||||
| struct Depsgraph *depsgraph = CTX_data_depsgraph(C); | struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | ||||
| View3D *v3d = sa->spacedata.first; | View3D *v3d = sa->spacedata.first; | ||||
| RegionView3D *rv3d = ar->regiondata; | RegionView3D *rv3d = ar->regiondata; | ||||
| /* weak, we could pass in some reference point */ | /* weak, we could pass in some reference point */ | ||||
| const float *view_co = v3d->camera ? v3d->camera->obmat[3] : rv3d->viewinv[3]; | const float *view_co = v3d->camera ? v3d->camera->obmat[3] : rv3d->viewinv[3]; | ||||
| const int mval[2] = {mx - ar->winrct.xmin, my - ar->winrct.ymin}; | const int mval[2] = {mx - ar->winrct.xmin, my - ar->winrct.ymin}; | ||||
| float co[3]; | float co[3]; | ||||
| CTX_wm_area_set(C, sa); | CTX_wm_area_set(C, sa); | ||||
| ▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines | |||||