Commit Graph

985 Commits

Author SHA1 Message Date
5549904171 style cleanup 2012-10-29 02:11:40 +00:00
0c6a0b293f style cleanup 2012-10-28 15:23:16 +00:00
d800cffaf1 Event system fix:
Now modifier key press gets generated without having own modifier set.
Same happens for double clicks on modifiers.

This also fixes case: press shift twice first, modifier fails.
2012-10-28 14:49:40 +00:00
dca3587edd Event system cleanup: bringing KM_CLICK back in control.
- Solved Modal Keymap hijack of event codes
  (with note this should be coded better)

- Added dedicated state variable check_click in event to trigger it

All this in an attempt to get code understandable and predictable again. :)

This solves error like:
- editmode mesh
- select a vertex
- grab it, press control for grid snap
- on LMB assign, it also did an extrude.
2012-10-28 11:19:35 +00:00
c9e5b1e6ee add --debug-handlers so --debug-events isnt so noisy. 2012-10-27 15:05:12 +00:00
7413adce04 add back debug prints for event handlers. not sure why they were removed in r51683 2012-10-27 14:55:31 +00:00
4682e7c7ce Another tweak in event code to get KM_CLICK work.
It was copying 'prevval' and 'prevtype' too often - can cause issues with
different event systems or perifirals.
2012-10-27 13:35:33 +00:00
3189dac959 The UI wasn't capable of handling Double Click events; causing fast typing to
not work.

This is a temporary fix to make button type work. I'll check on other cases
now too. 

Best would be to have UI code return correct flags for whether it has
done something or not. This hasn't been coded really - so that's a todo for
a later cleanup there.
2012-10-27 09:52:26 +00:00
e903701450 style cleanup 2012-10-27 01:46:47 +00:00
dd176509fd Bugfix for new handling of double-click:
The modifier keys were getting own key as modifier :)
Made it not possible to use them for events.

Still open issue: for some reason modifer key 'press' gets swallowed.
Digging into that.
2012-10-26 16:46:26 +00:00
37bf6ef044 Bugfix #28734
Double clicks were never working reliably in Blender - this mostly because
it wasn't a real event, but something generated in the handler code.

Now it is an actual event - meaning it always gets handled (if you have
a keymap item for it of course), but if there's no doubleclick handling
it treats the doubleclick as a normal click.

Also cleaned code. No recursion anymore.
2012-10-26 15:21:31 +00:00
da9f9c27bc debug output: stop printing event handlers for mouse moves of mouse inbetween events. 2012-10-23 13:29:56 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
29392dc2b4 don't print mousemoves with wm_handlers_do and --debug-events 2012-10-20 16:04:15 +00:00
4c936221a3 Fix #32705: Esc a value change doesn't recalc compositor
Seems the issue was caused by G.is_break set to Truth on both escape
press and release. This ended up in situation when after press event
compositor was tagged to redraw and new job was started. On escape
release this compositor job was cancelled.

Made it so G.is_break is setting on escape press event only.
2012-10-19 11:47:33 +00:00
8e01b8959e style cleanup 2012-10-14 13:08:19 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
d732e05740 fix for header not updating with an error report when a job finishes.
was reported as a reply to [#32537], but is a different issue then the original report.
2012-09-28 04:00:06 +00:00
c5baae40f7 wm_event_do_handlers was calling sound_sync_scene() twice without error checking the result of the second call. 2012-09-27 02:18:14 +00:00
1541ee20c8 Improvement to own commit r50810.
Add an optional ghost argument to set the new mouse location when un-grabbing. - without this the mouse would flicker at the old location before moving to the new location - when using the color picker for eg.
2012-09-22 13:23:12 +00:00
1a7eb3454e style cleanup 2012-09-08 08:59:47 +00:00
8cf9e5f8c3 change templates to call modal_handler_add() is called last since any errors between calling this function and returning will crash blender. see [#30687] 2012-09-05 00:11:39 +00:00
56b28635e7 code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention. 2012-08-23 18:25:45 +00:00
adec7cdea2 Patch #32326: NDOF support of rotation and panning the view at the same time
Additional changes:
- Option to the ndof menu letting you pick turntable/trackball independently
  of the mouse viewport navigation style
- Option to change the rotation sensitivity separate from the panning

Holding shift + moving the ndof does just as before locking it to panning
Holding ctrl + moving will lock it to only rotation

Patch by Fredrik Hansson, thanks!

Reviewed by self and Mike Erwin.
2012-08-19 13:52:36 +00:00
c567cf3fab code cleanup: WM naming conventions 2012-08-11 21:35:24 +00:00
f0951f58ca code cleanup: rename G.afbreek --> is_break, G.rendering --> is_rendering 2012-08-08 18:37:06 +00:00
0fee289551 style cleanup: >120 line length 2012-08-01 10:44:55 +00:00
a70a48814e fix [#32232] Running script that changes area.type crashes blender.
(reported the bug to keep some reference to the script that crashes).
2012-07-31 22:15:54 +00:00
071a1034d6 add mask keymap to image window.
debug prints for events when --debug-events is used to help track down why a key is/isnt used.
2012-07-25 14:46:38 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
a5127dba57 vector versions of BLI_in_rctf / BLI_in_rcti, (BLI_in_rctf_v, BLI_in_rcti_v)
use where possible.
2012-07-11 18:17:48 +00:00
a09feb7386 option so operators can be executed with undo enabled (and redo). 2012-06-27 21:41:17 +00:00
8796c3eff1 Fix part 2 of [#31840] Quick Explode Bugs related to it's fade option.
This in fact had nothing to see with this operator or its fade option, reports were simply not shown when repeating an operator.

Carefully checked/tracked all calls to wm_operator_exec and WM_operator_repeat, and could not see any reason why this was this way, so I disabled this. Very easy to undo in case ugly problems arize (but I really do not expect any!).
2012-06-19 16:26:01 +00:00
3a6f573b95 style cleanup: also quiet a warning. 2012-06-17 11:36:28 +00:00
4e4e5bb7ff Comment no longer accurate. 2012-06-15 01:43:07 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
6b554c5ec4 Fix for last commit, forgot to update Screen.is_animation_playing python property. 2012-05-25 12:56:29 +00:00
ad65b7b86b Animation playback: now all windows are update during playback, rather than
just the active window.
2012-05-25 12:37:11 +00:00
Lukas Toenne
53b01d9002 A number of new features for the node editor in general and the Frame node in particular.
For an detailed user-level description of new features see the following blogpost:

http://code.blender.org/index.php/2012/05/node-editing-tweaks/

TL;DR:
* Frame node gets more usable bounding-box behavior
* Node resizing has helpful mouse cursor indicators and works on all borders
* Node selection/active colors are themeable independently
* Customizable background colors for nodes (useful for frames visual
distinction).
2012-05-22 14:13:33 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +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
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
04d8ef3c47 wireframe option to crase edges at the hub, much nicer subsurf 2012-04-29 12:33:56 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
bb7db93837 temp disable 'use last operator settings' - too unreliable, we keep getting reports in about some menu item not working right, will try have this ready by next release. 2012-04-25 10:09:31 +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
ae654301b0 style cleanup: wm, mosyly adding space around ops 2012-03-27 01:24:16 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00