186 const float mval_center_fl[2] = {(
float)region->
winx / 2, (
float)region->
winy / 2};
192 *r_depth =
len_v3v3(view_co, co_align);
235 if (depth != -1.0f) {
245 if (depth != -1.0f) {
267 switch (event->
val) {
272 const bool is_undo = ddr->
is_undo;
371 ot->
name =
"Eyedropper Depth";
372 ot->
idname =
"UI_OT_eyedropper_depth";
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
struct View3D * CTX_wm_view3d(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct ScrArea * BKE_screen_find_area_xy(struct bScreen *screen, const int spacetype, int x, int y)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, const int regiontype, int x, int y)
struct SpaceType * BKE_spacetype_from_id(int spaceid)
struct ARegionType * BKE_regiontype_from_id(const struct SpaceType *st, int regionid)
size_t BKE_unit_value_as_string(char *str, int len_max, double value, int prec, int type, const struct UnitSettings *settings, bool pad)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
struct Depsgraph Depsgraph
#define ID_IS_LINKED(_id)
Object is a sort of wrapper for general info.
void ED_region_tag_redraw(struct ARegion *region)
void * ED_region_draw_cb_activate(struct ARegionType *art, void(*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type)
#define REGION_DRAW_POST_PIXEL
void ED_region_draw_cb_exit(struct ARegionType *, void *)
bool ED_view3d_autodist(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], const bool alphaoverride, const float fallback_depth_pt[3])
void ED_view3d_win_to_3d(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3])
void view3d_operator_needs_opengl(const struct bContext *C)
Read Guarded memory(de)allocation.
StructRNA RNA_CameraDOFSettings
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region)
uiBut * UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
bool UI_but_flag_is_set(uiBut *but, int flag)
const Depsgraph * depsgraph
void eyedropper_draw_cursor_text_region(const struct bContext *C, const ARegion *region, const char *name)
static void depthdropper_depth_sample_accum(bContext *C, DepthDropper *ddr, int mx, int my)
static void depthdropper_depth_set_accum(bContext *C, DepthDropper *ddr)
static int depthdropper_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void UI_OT_eyedropper_depth(wmOperatorType *ot)
static int depthdropper_exec(bContext *C, wmOperator *op)
static void depthdropper_depth_sample_pt(bContext *C, DepthDropper *ddr, int mx, int my, float *r_depth)
get the ID from the screen.
static int depthdropper_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void depthdropper_exit(bContext *C, wmOperator *op)
static void depthdropper_draw_cb(const struct bContext *C, ARegion *region, void *arg)
static void depthdropper_cancel(bContext *C, wmOperator *op)
static bool depthdropper_poll(bContext *C)
static void depthdropper_depth_sample(bContext *C, DepthDropper *ddr, int mx, int my)
static void depthdropper_depth_set(bContext *C, DepthDropper *ddr, const float depth)
struct DepthDropper DepthDropper
static int depthdropper_init(bContext *C, wmOperator *op)
@ EYE_MODAL_SAMPLE_CONFIRM
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PropertyType RNA_property_type(PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop_orig)
struct CameraDOFSettings dof
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)