Commit Graph

16 Commits

Author SHA1 Message Date
Campbell Barton
3b5eac548f Fix depth-eyedropper crashing outside 3d view
Also set the eyedropper operators as internal.
2015-02-12 02:17:03 +11:00
Campbell Barton
12bf84cbe4 BKE_screen: add BKE_screen_find_area_xy
Use from eyedropper & screen operators
also define SPACE_TYPE_ANY for readability.
2015-01-21 13:43:46 +11:00
Campbell Barton
289960787e Fix UI glitches drawing text at different sizes
Font height was ignoring DPI in some cases (camera-name & eyedropper).
2015-01-20 15:50:20 +11:00
Campbell Barton
09eec627ed UI: cleanup UI_fontstyle_string_width, UI_draw_string
Both were maked as temp, but used often.

Now pass uiFontStyle to both, rename UI_draw_string to UI_fontstyle_draw_simple,
since its a variant of UI_fontstyle_draw that skips shadow, align... etc.
2015-01-20 15:50:20 +11:00
Bastien Montagne
a8fa291b8c Fix two potential bugs reported by latest coverity scan. 2015-01-19 17:51:25 +01:00
Campbell Barton
3d503ea8d6 UI: Eyedropper for view-depth
Currently this is mainly useful for picking camera DOF depth.

- EKey over a distance field prompts you to pick a depth from the camera.
- WKey (Specials menu) to pick from the 3D view (when the active camera's selected).
2015-01-14 08:46:55 +11:00
Campbell Barton
98d4831969 cleanup: style & tips 2014-11-26 10:44:06 +01:00
Campbell Barton
5c6e333780 UI Refactor T41640
Make the UI API more consistent and reduce confusion with some naming.

mainly:
- API function calls
- enum values

some internal static functions have been left for now
2014-11-10 23:06:54 +01:00
Campbell Barton
b6e967be63 Code cleanup: const args and arrays 2014-04-27 08:56:54 +10:00
Sergey Sharybin
0d38f21cbc Fix the eyedropper not working properly with different scene linear spaces
Either was some residue from the past or somebody didn't implement this in
the right way.

Also fixed memory leak in ED_space_clip_color_sample() caused by missing
image buffer release.
2014-04-14 13:48:20 +06:00
Campbell Barton
b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
Campbell Barton
3bc0552c5b Fix for running datablock eyedropper outside of a button. 2013-11-19 07:10:56 +11:00
Campbell Barton
7267221715 remove return argument from wmOperatorType->cancel, was only ever returning OPERATOR_CANCELLED. 2013-10-30 23:08:53 +00:00
Campbell Barton
3e79a0a5e0 fix for possible eyedropper NULL pointer use. 2013-10-12 18:11:54 +00:00
Campbell Barton
03f7885b0a id-data eyedropprt, currently only accessible via the Ekey,
We need to investigate ways to add options like this without cluttering the interface.
2013-10-08 15:32:54 +00:00
Campbell Barton
ed758beb66 move eyedropper into its own file, uses mostly different includes to interface_ops.c 2013-10-08 15:07:52 +00:00