Commit Graph

173 Commits

Author SHA1 Message Date
Lukas Toenne
855b6391ea Basic snapping in node transform operator.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.

Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.

Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
2012-06-28 08:47:22 +00:00
cf129d8cb5 avoid calls to BLF_height_default in a loop calling with the same value, also quiet warning. 2012-06-20 19:23:12 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
ed679693c9 style cleanup: whitespace/indentation 2012-05-19 13:55:54 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
8765dfccf7 style cleanup: correct typos 2012-04-21 14:14:58 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
6faeac9fe2 style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros. 2012-03-25 22:35:18 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
ed04c21374 code cleanup: use float vector size in function definitions, and const's where the values are unchanged. 2012-02-28 14:05:00 +00:00
b95beea539 style chang, made mainly because I wanted to be able to add breakpoints to MEM_freeN calls which were on the same line as the if's. 2012-01-21 22:00:40 +00:00
e10fd04db0 use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
2012-01-11 12:33:51 +00:00
535d27eb49 minor cleanup for string use - no functional changes
- use more logical names for strings, noticed too many strings called `str` when reviewing name patch.
- pass __func__ macro to uiBeginBlock(), quite a few names were wrong (copy/paste error).
2012-01-11 09:33:44 +00:00
b21a0f4fa1 formatting edits 120 line length 2011-12-24 02:37:42 +00:00
7217518179 UI:
* Add theme option to show panel header background.
* Draw panel collapse widget a bit smaller.
* Add theme option to draw icons muted.
* Code tweak: replace U.themes.first by UI_GetTheme() calls.
2011-11-19 20:57:53 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
7172316b94 Merging r40366 through r40392 from trunk into soc-2011-garlic 2011-09-20 12:01:16 +00:00
84d06f252e tag & comment unused vars with /* UNUSED */ 2011-09-20 08:48:48 +00:00
Xiao Xiangquan
77926a7f9d select uiStyle according to UserDef and update lang-packs 2011-07-16 18:28:24 +00:00
Xiao Xiangquan
b429af10d0 merge from trunk #37722 2011-06-24 03:30:50 +00:00
1283b07409 use ascii drawing function where utf8 isnt needed. 2011-06-18 09:01:26 +00:00
170716ca53 use BKE_area_find_region_type in place of inline loops (no functional changes). 2011-05-20 05:27:31 +00:00
5f5cdf9d00 for bug [#27358] Transform bug when transform > 500
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.

this problem still happens on linux because of XTranslateCoordinates
2011-05-12 16:47:36 +00:00
8d7c3f8a7e interface: floats were being implicitly promoted to doubles, adjust to use floats (in most cases) otherwise cast to double. 2011-03-27 14:52:16 +00:00
c7fccc84bf use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. 2011-03-05 10:29:10 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
f5e2669444 Icons in outliner were jittering a bit on sizing of the area.
Subpixel position issue... when is this ever correct? :)
2011-02-01 17:54:02 +00:00
c7ea17bb92 After test, offset is better to be 0.001f (test in windows nvidia) 2011-01-26 12:48:22 +00:00
efa9d4f7e0 Bugfix #25756
Outliner was drawing icons sometimes blurred. Happens when subpixel
positions vary. UI code doesn't suffer this, it makes own ortho for
it.

This fix re-uses an un-used v2d flag (V2D_PIXELOFS_X) to force a 2d
view on pixel exact positions. It's set for outliner only, I need
testing feedback first.
2011-01-26 12:26:44 +00:00
70a828d5a5 remove unused vars, comment some which look like they could be useful still. have makesrna.c omit unused _data definitions for rna funcs with no args. 2011-01-09 01:17:56 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
5eaad696e8 Bugfix, own collection
Graph editor: sliding Nkey Properties to left, closing curves view
entirely, was hanging in eternal loop. Caused by division by zero.
2011-01-03 18:57:13 +00:00
9297cb01f6 Todo item:
2D view scrollers were drawing over background contents, making it
look somewhat messy (like for text, nodes, fcurves). Now it clears
first the back in the region edge.
2011-01-03 18:14:10 +00:00
a7ceeafd71 - correct typos in comments.
- move boxpack struct out of the public header.
2011-01-02 11:06:50 +00:00
858ae19e4e Fix #25375: Vertical numbers in F-Curve Editor out-of-alignment with grid
Issue caused because previously sliders used a separate mask and now they're
drawing inside of region.

Thanks to AlexKu for point and Ton for checking :)
2010-12-26 10:34:09 +00:00
3bed4cbf2b fix [#25283] Edge length display difficult to read
- made theme colors for mesh edge len & face angle/area display.
- use %g rather then %f for float display, trims unneeded zeros.
- store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context.
- use unsigned char for more color functions, avoids casting to glColorubv().
2010-12-20 03:59:22 +00:00
d620ff8380 2D text drawing
- with the NLA on a small strip text was drawn under the scroll bar, now draw with same alignment as rectangle constrained text.
- single alloc per text item.
- was using opengl context rather then passing color value.
2010-12-07 07:02:47 +00:00
b45c3363fd fix for some pedantic warnings. 2010-12-03 01:52:28 +00:00
01169dd632 Bugfix #24971
Outliner: if bottom slider was hidden, you still could not click there
on items. Code was using region-mask to clip input, but the mask is not
adjusted for sliders now (keeps view same).
2010-11-29 17:10:46 +00:00
80a650dfb1 BLF_draw functions take an extra length argument, so the console drawing doenst need to swap in NULL chars to draw word wrapping. 2010-11-11 06:35:45 +00:00
0dde63c044 bugfix [#24377] Bad frames drawn 2010-10-25 13:37:49 +00:00