Commit Graph

154 Commits

Author SHA1 Message Date
Xiao Xiangquan
9b8538c69c 3D view, graph editor, etc. done 2011-07-02 03:17:09 +00:00
Xiao Xiangquan
de12f8049a translate left panel 2011-06-15 11:41:15 +00:00
a43309e8d4 Added cancel callbacks to modal operators which allocates memory
in invoke callback. This prevents unfreed memory blocks when quiting
Bledner with modal operator running.
2011-06-06 11:04:54 +00:00
9f766c71b0 use event->mval rather then subtracting ar->winrct.x / y from event->x / y 2011-05-20 07:40:05 +00:00
2ca7ded51d Bugfix #27181
2D view panning and zooming is now fully keymappable, you can set a
keyboard key to it too (hold key -> move mouse -> release key).
2011-05-12 13:49:47 +00:00
c4debb1c64 Bugfix #26977 + Patch by Harley Acheson
Using search for operators showed ambigious names like "Duplicate" or "Delete".
Default names should give at least a descriptive label. In case operators
are collected in a group name-shortening should be handled separaly.
2011-04-19 11:17:29 +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
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
27e812d697 Clear some compiler warnings by commenting some functions, adding others to headers.
left in warnings where functions obviously need to get ported to 2.5x still.

Also, render stamp seq strip works again.
2011-02-17 22:34:41 +00:00
8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
4124804b4e many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static.

also fixed an error were the fluid modifier definition and the header didnt have the same number of args.
2011-02-13 14:16:36 +00:00
ac56fef228 Todo items:
- Outliner: new scroll operator, PageUp PageDown scroll entire page now.
- 2D views (like buttons) PageUp PageDown now also scroll entire page.
  (they used same step as scrollwheel before)
2011-01-08 18:37:11 +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
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +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
278124669b bugfix #24573
View2d custom keymap to put zoom in RMB didn't work, the modal handler
still has a hardcoded check for mouse/keys. Fixed it for this case quickly,
added wiki todo and warning in code.
2010-11-10 16:22:19 +00:00
f0b01220e5 'Continue' zoom method for 2d views wasn't continuously updating. added a timer so it works like the 3D view. 2010-11-05 03:54:54 +00:00
6753882e42 bugfix [#24009] Crash when switching area types and performing ops 2010-11-04 15:59:09 +00:00
db09ca106d remove/tag unused args for view*.c, gpu*.c & image*.c 2010-10-15 12:29:02 +00:00
f81248265d tag UNUSED() for operator exec() and invoke() functions. 2010-10-15 01:36:14 +00:00
2ef0d5e134 remove calls to WM_event_add_mousemove r22031, from view2d operators since it would cause a feedback loop where the operator apply function would keep using mousemove events and creating them.
This was added for view updates but think it needs to be solved a better way.
2010-10-06 21:54:30 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
8c455e1da8 remove unused includes 2010-08-08 08:33:47 +00:00
c5605c10d6 Assorted View2D formatting tidyups... 2010-06-08 00:51:57 +00:00
d8fa59ce01 Allow clicking in the empty area of a scrollbar (in the 'groove' outside the scroller itself)
to page up/page down.
2010-05-08 04:32:48 +00:00
7b98f6220b Bugfix #21853: Border zoom in the 2D-Views zooms out
* Fixed the way the operator was checking for what the user wanted when using the operator
* Added a few specific defines to a copy of the gesture border modal keymap (added one for zooming only) labelled 'In' and 'Out' which make this more useful than being hacked to use select and deselect
2010-04-02 03:52:44 +00:00
c36e00cd52 Performance tweak - on region pan/scale, only redraw the region itself
instead of the entire area (eg. so panning tool shelf doesn't lag when 3d view 
redrawing is slow).
2010-03-30 07:57:07 +00:00
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
15fae3c269 Fix [#21476] Mousewheel speed disrepancy
Tweaked mouse wheel sensitivity in scrolling 2d views
2010-03-10 02:06:28 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
bd88fb372f Bugfixes:
1) Summary channel in DopeSheet was using uninitialised color for backdrop, resulting in weird/wrong colours
2) Commented out the view2d hotkeys added earlier, since they currently cause some conflicts for animation editor hotkeys (namely NLA)
2010-02-12 11:48:55 +00:00
f97db86139 Quicky View2D commit:
Page Up/Down hotkeys for working with scrolling View2D views
2010-02-12 10:20:11 +00:00
148435b70a batch remove .'s used with RNA_def_struct_ui_text 2010-02-10 21:15:44 +00:00
1277543732 Various tweaks to View2D code for handling of scrollbar interactions in relation to bug 19881:
* Clearly labelled the way that the scrollbar hiding works. Also see the report comments for an overview
* Added another pair of flags for another one of the cases in which scrollbars should also get ignored; when the entire contents of the view are visible, a pair of flags is now set in the view2d data (instead of for the scrollers tempdata only) for detecting this case too
* Fixed the potential for scrollbars without zoom handles shown to have those handles still considered. This still happened in the User Preferences window, but has now been disabled.

--

These changes still don't solve the bug though. Currently after the scrollbar operator passes through, the Outliner's activate-selection operators still fail to start.
2010-01-31 11:13:31 +00:00
a368d5269a Fix [#20874] zoom to mouse only in 3d view
Zoom to mouse was working in 2D Views for modal zoom (ctrl MMB) but not for mouse wheel.
2010-01-29 08:13:31 +00:00
4a011a99cb Multitouch trackpad 2 fingers gestures implementation
- 2 fingers scroll (MOUSEPAN / GHOST_kTrackpadEventScroll event) pans/scrolls the view
- 2 fingers pinch (MOUSEZOOM / GHOST_kTrackpadEventMagnify event) zooms the view
And in 3D view:
- alt + 2 fingers scroll rotates the view
- 2 fingers rotation (MOUSEROTATE / GHOST_kTrackpadEventRotate) orbits the view.

The implementation uses a new GHOST event type: GHOST_kEventTrackpad, that is then dispatched as Blender MOUSEPAN, MOUSEZOOM
or MOUSEROTATE events.

This is currently fully implemented for OSX (GHOST Cocoa fires the new events), with auto-detection of the source peripheral, so that a regular mouse still sends MOUSEWHEEL events.
2010-01-11 11:14:36 +00:00
907ee73e23 2 small view navigation features stolen from other apps :)
* Now, while rotating a 3D view with MMB held down, you can hold shift to switch to Pan or ctrl to switch to Zoom, without having to let go of MMB. While it sounds simple it makes things really smooth to use and eases repeated presses of MMB. One thing I liked from Max. It's also in the modal key maps, so you can change it to whatever you like.

* A similar thing, when panning a 2D View, you can hold LMB to switch to zoom, effectively making MMB+LMB zoom. This is not very useful on a mouse, but it's very nice for tablet use, being able to navigate with one hand (side switch+stylus press) very easily. This one's from Fusion.
2010-01-06 12:22:59 +00:00
5c3879f8fb zoom to mouse for 2D view
note: this works in all views except for nodes which seem to use the view bounds differently
2009-12-22 08:39:59 +00:00
0af48c227b Copy To Selected
Until we have proper multi-object editing, this adds a Copy To Selected
option to the right mouse button menu for Object and Bone properties, to
copy the value from the active object to the selected objects.

Also includes some implementation changes to reset to default operator.
2009-12-17 17:15:38 +00:00
8d996df7ce Adding POINTER_GRAB flag to view 2d pan operator, to make it use continuous grab. 2009-12-17 01:19:50 +00:00
088c6d6666 Bugfix #19923: UVImage editor gets stuck in move/zoom mode 2009-11-20 10:21:31 +00:00
bf575a1c16 * Changed scroll bar scale handles back to scaling from either side, rather than to the center (ctrl-drag or mouse wheel works fine for that) 2009-11-19 04:13:18 +00:00
849ee94cf9 Partial fixes for #19881: Items existing on the same row as the window dividers are not interactive (selectable, etc.)
The View 2D function for handling scrollbar events now takes into account whether the scrollbar is visible or not, so that it won't block events when the scrollbar isn't visible.

Also, made the UI code take this into account too for its region testing code. Unforunately, there still seems to be something else which is still preventing UI buttons from being processed when they are in those regions.
2009-11-18 10:37:32 +00:00
3ebd58673f Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.

There's actually 3 levels now:

* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
  or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
  to .py files as well to make creating distributable configurations
  easier.

Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.


Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
  keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
  added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
f16d2b7eaa fix for middle mouse up events not working with modal keymaps (used for fly mode).
With mouse events event->val started as 0/1 for press/release but later the tweak function made LMB and RMB zero value into KM_RELEASE, somehow MMB didnt get used by the tweak function so was left at 0 and the modal keymap function failed when comparing MMB Mouse ups.

now initialize event->val as KM_PRESS/KM_RELEASE
2009-09-24 10:35:04 +00:00
854ea35a24 2.5: Handlers are now evaluated in a different order, fixing some
issues like Shift+R (repeat last) not giving capital R in the text
editor. There is also new modal handler list at the window level,
and the API call will always add it to that one now, since modal
handlers were not used in other levels.

The order used to be:
* window modal + keymap
* area modal + keymap
* region modal + keymap

Now it is:
* window modal
* region keymap
* area keymap
* window keymap
2009-09-18 12:43:36 +00:00
69e919530e Keymaps now have a poll() function, rather than adding/removing
their handlers based on notifiers, which is simpler and more
reliable.

This fixes for example editmode or uv edit keymaps not working
when creating a new 3dview or image space.
2009-09-17 21:36:02 +00:00
f5e80e7a80 Operator docstring patch from Ron Walker, added console operator docs too. 2009-09-07 04:52:42 +00:00
3bc5d87e50 2.5
Bugfix: new ALT+LMB pan in 2d windows hanged eternally; the modal keymaps
didnt support this yet. Is on todo; but fix is easy for now.

Also don't know if this is the right way to do it... systems with MMB can
also get it as macro (like action mouse, select mouse).
2009-09-01 17:31:33 +00:00