Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-07-22Prepare for NDOF event handling all the way to keymaps (and keymap editor).Nathan Letwory
2011-06-19resolved collision among WM event types, ndof no longer encroaches on ↵Mike Erwin
keyboard turf
2011-06-16Standard views (front, top, etc.) work from buttons on SpaceExplorer and ↵Mike Erwin
SpacePilotPro. Linux can now determine which NDOF device is plugged in.
2011-06-09migrated NDOF code from soc-2010-merwin, SpaceNavigator now works on Mac blenderMike Erwin
2011-03-28Maintenance:Ton Roosendaal
Gave the report-timer (in top header) an own TIMER define, to not confuse with timers in use for UI. Easier for debugging. :) Also gave better malloc names to regions in 3d window. All this for testing proper buffer drawing in Intel cards... which is still unsolved.
2011-02-25doxygen: blender/windowmanager tagged.Nathan Letwory
2011-02-19Adding support for the "media" play/pause/stop/next/prev buttonsJoshua Leung
available on many keyboards these days, so that they can be used for animation playback (giving more options over alt-a and alt-a ad- infinitum). Currently, this is Windows only as I don't have a Linux/Mac system to test on (it should compile with both mingw and msvc, at least using scons). Maintainers for those systems can probably easily add this in once they find out the relevant mappings for those systems.
2010-12-15Bugfix, own collectionTon Roosendaal
Using RMB on menus to change hotkeys was broken. - the input button was on a weird place outside menu, assign would close pulldown, so you had to reopen to check - ESC didn't close the button, but assigned ESC as hotkey. This key is a protected key, and always should be escaping. - Worst bug: if you used this on a 'user keymap' it removed all entries from the map...
2010-12-05use constant strings for outliner menus rather then sprint'ing them together.Campbell Barton
2010-10-05rename Command key to OSKey, Window manager already called it the OSKey but ↵Campbell Barton
internally it was mixed.
2010-09-18Apply patch [#23846] Fix for [#23698] in File Browser system. Properly ↵Nathan Letwory
removes handler and sfile when File selector disapears. Patch by Alexander Kuznetsov Reported by Chidozie Oku From patch description: " Handler is now released on every exit from File Selector. For example pressing ctrl-up and then changing editor type to another also releases the handler. When an area is changed from SPACE_FILE, ED_fileselect_exit is called for clean up. It takes function of freeing folder list and files (before it was done in cancel or exec functions) because they must be released on every exit anyway. op!=null means cancel or exec was not executed so a handler was not released. ED_fileselect_exit then releases the handler without changing screens. " Thanks!
2010-08-07SpaceNav turntable and fit in 3D view. Tablet data rides with cursor/button ↵Mike Erwin
events (incomplete! Mac-only for now). Grease pencil works better with pen.
2010-06-23Fix #22553: dragging number buttons would run update functions more often thanBrecht Van Lommel
necessary due to the more accurate mouse move events that are useful for sculpting and painting (at least on Linux/X11, not sure about other platforms). If the update function takes a while to run, this in turn causes more mouse move events to be accumulated, making things even slower, .. going into a spiral of slower and slower redraws. As a solution I've added a INBETWEEN_MOUSEMOVE event next to MOUSEMOVE. A MOUSEMOVE event is automatically changed to INBETWEEN_MOUSEMOVE when a MOUSEMOVE event is added after it. This new event type is only handled by painting/sculpting operators, everything else can happily ignore it.
2010-05-30reverting previous commit from Mitchell. His commit went to the trunk ↵Dalai Felinto
instead of the branch :) svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2010-05-30Reversing the last merge because I botched it.Mitchell Stokes
2010-05-29Esc as input for Key Buttons (e.g Logic Brick Keyboard Sensor)Dalai Felinto
After talking with Brecht he agreed on allowing Esc to be used as input for key input butons. In order to let the user to cancel an input it can cancel it clicking outside the button. Also replacing manual check by ui_mouse_inside_button in ui_text function (patch reviewed (and helped) by Matt (but the change on ISHOTKEY, that's on my own risk ;))
2010-05-07Restrict keyboard sensor stored events to only what's appropriate per propertyMatt Ebb
(normal key, modifier key, etc)
2010-04-20Added ability to use up to F19 on the keyboard (previous max was F12). Matt Ebb
GHOST is already collecting up to F24, but I've only got up to F19 on this keyboard so I've just committed what I could test here.
2010-04-04Added a new 'straight line' gesture type that can be used in any operator.Matt Ebb
Use this for image editor Line Sample tool, rather than custom modal operator/ custom drawing.
2010-04-02Bugfix #21853: Border zoom in the 2D-Views zooms outJoshua Leung
* 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-03-21Fix syntax for ID keyword.Guillermo S. Romero
2010-02-12correct fsf addressCampbell Barton
2010-02-01Fix #19888: tooltip would stay visible when starting e.g. panning theBrecht Van Lommel
view, and be stuck there permantenly when leaving the region. Now the button interaction is cancelled when starting a modal operator, not too happy about this, but couldn't think of another way to detect this well.
2010-01-26Drag and drop 2.5 integration! Finally, slashdot regulars can useTon Roosendaal
Blender too now! :) ** Drag works as follows: - drag-able items are defined by the standard interface ui toolkit - each button can get this feature, via uiButSetDragXXX(but, ...). There are calls to define drag-able images, ID blocks, RNA paths, file paths, and so on. By default you drag an icon, exceptionally an ImBuf - Drag items are registered centrally in the WM, it allows more drag items simultaneous too, but not implemented ** Drop works as follows: - On mouse release, and if drag items exist in the WM, it converts the mouse event to an EVT_DROP type. This event then gets the full drag info as customdata - drop regions are defined with WM_dropbox_add(), similar to keymaps you can make a "drop map" this way, which become 'drop map handlers' in the queues. - next to that the UI kit handles some common button types (like accepting ID or names) to be catching a drop event too. - Every "drop box" has two callbacks: - poll() = check if the event drag data is relevant for this box - copy() = fill in custom properties in the dropbox to initialize an operator - The dropbox handler then calls its standard Operator with its dropbox properties. ** Currently implemented Drag items: - ID icons in browse buttons - ID icons in context menu of properties region - ID icons in outliner and rna viewer - FileBrowser icons - FileBrowser preview images Drag-able icons are subtly visualized by making them brighter a bit on mouse-over. In case the icon is a button or UI element too (most cases), the drag-able feature will make the item react to mouse-release instead of mouse-press. Drop options: - UI buttons: ID and text buttons (paste name) - View3d: Object ID drop copies object - View3d: Material ID drop assigns to object under cursor - View3d: Image ID drop assigns to object UV texture under cursor - Sequencer: Path drop will add either Image or Movie strip - Image window: Path drop will open image ** Drag and drop Notes: - Dropping into another Blender window (from same application) works too. I've added code that passes on mousemoves and clicks to other windows, without activating them though. This does make using multi-window Blender a bit friendler. - Dropping a file path to an image, is not the same as dropping an Image ID... keep this in mind. Sequencer for example wants paths to be dropped, textures in 3d window wants an Image ID. - Although drop boxes could be defined via Python, I suggest they're part of the UI and editor design (= how we want an editor to work), and not default offered configurable like keymaps. - At the moment only one item can be dragged at a time. This is for several reasons.... For one, Blender doesn't have a well defined uniform way to define "what is selected" (files, outliner items, etc). Secondly there's potential conflicts on what todo when you drop mixed drag sets on spots. All undefined stuff... nice for later. - Example to bypass the above: a collection of images that form a strip, should be represented in filewindow as a single sequence anyway. This then will fit well and gets handled neatly by design. - Another option to check is to allow multiple options per drop... it could show the operator as a sort of menu, allowing arrow or scrollwheel to choose. For time being I'd prefer to try to design a singular drop though, just offer only one drop action per data type on given spots. - What does work already, but a tad slow, is to use a function that detects an object (type) under cursor, so a drag item's option can be further refined (like drop object on object = parent). (disabled) ** More notes - Added saving for Region layouts (like split points for toolbar) - Label buttons now handle mouse over - File list: added full path entry for drop feature. - Filesel bugfix: wm_operator_exec() got called there and fully handled, while WM event code tried same. Added new OPERATOR_HANDLED flag for this. Maybe python needs it too? - Cocoa: added window move event, so multi-win setups work OK (didnt save). - Interface_handlers.c: removed win->active - Severe area copy bug: area handlers were not set to NULL - Filesel bugfix: next/prev folder list was not copied on area copies ** Leftover todos - Cocoa windows seem to hang on cases still... needs check - Cocoa 'draw overlap' swap doesn't work - Cocoa window loses focus permanently on using Spotlight (for these reasons, makefile building has Carbon as default atm) - ListView templates in UI cannot become dragged yet, needs review... it consists of two overlapping UI elements, preventing handling icon clicks. - There's already Ghost library code to handle dropping from OS into Blender window. I've noticed this code is unfinished for Macs, but seems to be complete for Windows. Needs test... currently, an external drop event will print in console when succesfully delivered to Blender's WM.
2010-01-11Multitouch trackpad 2 fingers gestures implementationDamien Plisson
- 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.
2009-12-17Typo in commentMartin Poirier
2009-12-08UI: fix trailing tooltips when deactivating window, and when openingBrecht Van Lommel
right click menu. Added window deactivate event for this.
2009-11-07- modal keymap for border selectCampbell Barton
- revert circle select keys adjustments & view navigation while selecting (durian guys liked but allowed activating multiple circle select's at once)
2009-11-05- converted circle select use a modal mapCampbell Barton
- now works exactly like 2.4x, except that its accessed from the CKey - hack to remember circle size, need some better way to do this
2009-10-20Auto SaveBrecht Van Lommel
Auto save is now working again in 2.5. It will also remember now what the location of the original file was when recovering it, so that library links still work and saving the restored file does not save to the temp directory. There is also a new Recover Auto Save operator which will open the filebrowser in the temp directory and show the auto saved .blends. Implemenation Notes: * Timer storage was moved from window to windowmanager, so we can have windowmanager level timers too now, doesn't make sense to have autosave timer attached to a particular window. * FileGlobal now has a filename field storing where the file was saved. Note that this is only used when loading a file through the recover operators, regular file read doesn't use it, so copying the quit.blend manually over the original file will still work as expected. * Jobs timer no longer uses operator now, this seems more like an internal thing, changing keymaps should not make it possible to break the jobs manager. * Autosave is postponed by 10 seconds when a modal operator is running, e.g. transform or file browsing. * Moved setting G.sce in setup_app_data before depsgraph updates, these can use the filename for pointcaches.
2009-10-08Key ConfigurationBrecht Van Lommel
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-09-21Fix #19361: BGE keyboard sensor allowed to set mouse eventsBrecht Van Lommel
too, should only be keyboard events.
2009-09-215 button mouse support from b333rt in IRC with some edits for X11.Campbell Barton
Tested in X11 where its fairly confusing. buttons 4 and 5 are used for the wheel which is well known, but it seems 6 and 7 are used for horizontal scrolling, my mouse assigns the extra 2 buttons to events 8 & 9. So the X11 events used for buttons called 4&5 in blender are 8&9 in X11. The mouse buttons can be re-ordered like this once xorg starts (swaps 6,7 with 8,9) xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7" Couldn't test Win32, Apple not supported. If someone wants to add horizontal scrolling its quite easy.
2009-09-16- bpy.data.sounds was a collection of ID's rather then SoundsCampbell Barton
- last commit, missed include for rna_object_api.c & bad args to find_basis_mball - use enum for GHOST tablet type None/Stylus/Eraser, had duplicate definition for these in C. Only tested X11, may need to cast to an int for other OS's.
2009-07-302.5 / Drag & DropElia Sarti
Removed all related code. Talked with Ton about this and agreed to postpone it at indefinite time in the future, when things get more relaxed. Files saved since my first commit should not break although I'm not 100% sure.
2009-07-282.5Ton Roosendaal
Keymap feature: RightMouse in pulldown menus allows to assign a new hotkey.
2009-07-252.5 / Drag & DropElia Sarti
Commit of basic architecture. Sorry, nothing fun to play with yet. Added two events: MOUSEDRAG and MOUSEDROP. MOUSEDRAG is sent when left-mouse clicking and then moving the cursor and every time the cursor is moved until the user releases the mouse button, thus generating a MOUSEDROP. Also added two dummy drag operators in view3d and outliner (place holders for now). Brecht and Ton: feel free to check/edit especially the event system code. I'm not sure that's the right way to do it. Also, I'm getting some mem leaks which I suspect are caused by my code.
2009-07-212.5Ton Roosendaal
Modal keymaps. I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support. The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way. This system also allows to still handle hardcoded own events. Tech doc: 1) define keymap - Create map with unique name, WM_modalkeymap_add() - Give map property definitions (EnumPropertyItem *) This only for UI, so user can get information on available options 2) items - WM_modalkeymap_add_item(): give it an enum value for events 3) activate - In keymap definition code, assign the modal keymap to operatortype WM_modalkeymap_assign() 4) event manager - The event handler will check for modal keymap, if so: - If the modal map has a match: - Sets event->type to EVT_MODAL_MAP - Sets event->val to the enum value 5) modal handler - If event type is EVT_MODAL_MAP: - Check event->val, handle it - Other events can just be handled still Two examples added in the code: editors/transform/transform.c: transform_modal_keymap() editors/screen/screen_ops.c: keymap_modal_set() Also: to support 'key release' the define KM_RELEASE now is officially used in event manager, this is not '0', so don't check key events with the old convention if(event->val) but use if(event->val==KM_PRESS)
2009-06-032.5Ton Roosendaal
Further work on new "text search" button. - Now allows to browse items (mouse, arrow key) - Assigns active value - Uses different backdrop to distinguish from popup menus - Cleaned API for it, so it can be used nicely generic Also added a search menu, which shows all currently working operators: CTRL+ALT+F. (mind the looks, it needs some tweaks!) To make a menu activating a button I've added a new event... could use some tweaks. Important note: the callback to pass on "old string" for text button (bone rename) couldn't work yet, added first code for new callback, but has to be worked on further. When bone rename gets added it can be tested.
2009-05-242.5Ton Roosendaal
First version of region-scaling. WIP commit, so bear with me a while! - All fixed sized regions have a small 'drag' widget, on the left or top. (not yet for free-sized regions, like 4-split). - Mouse-over on widget changes cursor and allows drag. - Click on widget hides/reveals. - Fun for test; 3d view header, if high enough, draws more rows of buttons when width is too small. The WIP stuff; - It doesn't save yet in files, using the "minsize" variable of region definitions, also means other similar areas show same sizes now. - Definitions for pref size, min/max will be added. - Properties panel in Fcurve window draws widget on wrong place when hidden (subdiv system needs tweak) - Widgets don't draw perfect yet, also needs further tweaks. But, in general it's quite fun and usable. :) Many variatians are possible, like for real tabs, or little icons, or just click-drag on edge. The reason to first try the widget/tab variation: - it re-uses the "Area Action Zone" code, widgets for layouting Screens - it's visible, hotkey-only options for screen layouts are not preferred. - distinguish clearly area-edges from region-edges this way. Having the cursor change shape on every edge (and block input) is probably annoying too... but that can be tested. Later more!
2009-03-012.5 - Text Editor bugfixJoshua Leung
KM_TEXTINPUT event matching was not correctly working for standard number keys (and chars such as @ # $ % ^ & etc.), which were being ignored. Ton - you might like to check this commit. It works fine here now, but it might not be the intended way.
2009-02-202.5:Brecht Van Lommel
* Image painting back. 2d paint, 3d paint and projection, undo, pressure, repeating paint operations, etc should all work. Drawing cursor needs a bit of work, only gets shown when enabling texture paint mode now. * Move sculpt, image paint, and vertex/weight paint into a single sculpt_paint module. Doesn't make much difference now, but nice to have it together for better integration and consistency in the future.
2009-02-162.5Ton Roosendaal
Cleanup of wm_event_types.h, removed all old "allqueue" defines.
2009-02-162.5Ton Roosendaal
Proper integration of File-selecting in WM. The communication flow was flawed. :) Main problem was that filewindow can change the screen context entirely, and should not do this directly on a call inside an operator. Another problem was that the operator ownership was handed over to SpaceFile, which is asking for problems if you want to execute the operator with proper context later on. Solution is simple; window handlers already are valid owners of operators and can manage context, so instead of directly talking to the 'file space', you give the operator to a new handler this way: WM_event_add_fileselect(C, op); This handler then listens to events (OPEN, EXEC, CANCEL) sent by the WM or by the filewindow itself. This way local context operators (like "open new image in imagewindow") will survive a full-window fileselector fine, and in future also secondary windows browsing files. Two bugfixes included in this commit too: - Add sequence menus in Sequencer used wrong context. - When handler executes operators, it sets stored context now by first checking if this is still valid.
2009-01-232.5Ton Roosendaal
Font object + editing back. Was quite some work due to a myriad of globals all over! Works nicely 100% local now. To enable a single textedit operator, I've added a new keymap entry KM_TEXTEDIT, which gives all keyboard events to the handler. Also had to add a new keymap-add function to force a keymap handler in beginning of region handlers. In future this can be used to prioritize handlers. Also: split off the arrow keys (frame change) to a separate region level handler. Can be set with default flag in regiontype->keymapflag ED_KEYMAP_FRAMES
2009-01-222.5Ton Roosendaal
Added WM Jobs manager - WM can manage threaded jobs for you; just provide a couple of components to get it work: - customdata, free callback for it - timer step, notifier code - start callback, update callback - Once started, each job runs an own timer, and will for every time step check necessary updates, or close the job when ready. - No drawing happens in jobs, that's for notifiers! - Every job stores an owner pointer, and based on this owner it will prevent multiple jobs to enter the stack. Instead it will re-use a running job, signal it to stop and allow caller to re-initialize it even. - Check new wm_jobs.c for more explanation. Jobs API is still under construction. Fun: BLI_addtail(&wm->jobs, steve); :) Put Node shader previews back using wmJobs - Preview calculating is now fully threaded (1 thread still) - Thanks to new event system + notifiers, you can see previews update even while dragging sliders! - Currently it only starts when you change a node setting. Warning: the thread render shares Node data, so don't delete nodes while it renders! This topic is on the todo to make safe. Also: - bug in region initialize (do_versions) showed channel list in node editor wrong. - flagged the channel list 'hidden' now, it was really in the way! This is for later to work on anyway. - recoded Render API callbacks so it gets handlers passed on, no globals to use anymore, remember? - previewrender code gets now so much nicer! Will remove a lot of stuff from code soon.
2009-01-042.5Ton Roosendaal
Think global, act local! The old favorite G.scene gone! Man... that took almost 2 days. Also removed G.curscreen and G.edbo. Not everything could get solved; here's some notes. - modifiers now store current scene in ModifierData. This is not meant for permanent, but it can probably stick there until we cleaned the anim system and depsgraph to cope better with timing issues. - Game engine G.scene should become an argument for staring it. Didn't solve this yet. - Texture nodes should get scene cfra, but the current implementation is too tightly wrapped to do it easily.
2009-01-012.5Ton Roosendaal
- Put back vertex/edge/face select - Mode menu allows going in/out editmode - Tested some tweak event stuff in WM, made tweak event follow user preset for 'action' or 'select' mouse. (Wanted to try this for transform, but better get advise from Martin first :)
2009-01-012.5Ton Roosendaal
- Made scrollwheel behave uniform for zooming. It uses the UserDef to map what's in our out. Use keymap entries WHEELINMOUSE and WHEELOUTMOUSE to trigger this. Also removed the feature to store in event->val the direction, it was conflicting with KM_ANY. - Added more default poll callbacks, use for generic ops things like ED_operator_object_active.
2008-12-262.5Ton Roosendaal
Timers: added extra 'event type' argument to call to add a timer: WM_event_add_window_timer(win, event_type, interval) This way other timer systems don't generate overhead on the queues. (button timers were creating unused animation-playback operators)