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
2008-12-13View2D: Joshua Leung
* Grid calculation now takes separate args for x/y units and clamping * Timeline now gets V2D_LOCKZOOM_Y flag to prevent zooming in y-axis
2008-12-122.5Ton Roosendaal
- Added rudimentary support for Ipo window (Joshua can check on view2d issues for this? :) - removed ED_area.h, added ED_space_api.h
2008-12-122.5Ton Roosendaal
- found fix for time-space view2d when increasing height of area, it has min/max Y zoom stored based on size of area... needs smarter way. - outliner: header file added, area switch menu + dummy pulldown. this will become template for other space types...
2008-12-122.5Ton Roosendaal
Fixes in view2d: - mask/slider rects were calculated wrong 1 pixel (was overlapping) - found bug with outliner stretching on area-edge-dragging. It required an extra mapping of the 'cur view' via mask to actual region. - added v2d sanity check for uninitialized v2d's - removed cruft in do_versions for headers (gets catched with above) - added header-view2d-initialize function, for new-space calls Fixes in areamanager: - fixes in 'new space' for time/outliner/view2d (unfinished) For Joshua: - Making time window higher shows it doesn't update 'cur'. Not sure what kind of v2d flag should be checked or set?
2008-12-122.5Ton Roosendaal
Resolved cyclic calls for editors. Now there's a space_api/ module, here you can use functions calling other editor modules. The functions in the module are only used by the WindowManager module to initialize space types. Note for sconzers and MSVC and cmake: the proper linking order for editors is: - space_api - space_xxx - object / mesh / transform / etc - interface - util / datafiles - screen
2008-12-122.5 - Compiling fix (ED_newspace not defined yet)Joshua Leung
2008-12-112.5Ton Roosendaal
Today's progress; half working, but i better commit to prevent conflicts tomorrow :) - added storage for regions in spacedata - added space switching (unfinished, gives mem-free errors) - bugfix: icon of timewindow gave error on split-area - cleaned interface_icons.c a bit, no warnings - first work on space new() callbacks, they have to make regions too NOTE: probably files saved with 2.5 crash now. Have to look at patching this. NOTE2: the Makefiles required libeditor screen twice... scons too?
2008-12-112.5Ton Roosendaal
TimeLine window pulldowns work sorta (for the options that were coded :) Still trying to bring back code without recoding uiDefButs. In future these will get directly operator stuff linked. For time being made a simple operator call function, like: WM_operator_call(C, "ED_MARKER_OT_add"); and for forcing operator to run in the main region-window: WM_operator_call_rwin(C, "ED_MARKER_OT_add"); These calls also work for modal operators, like marker grab in this case.
2008-12-11View2D: Various Fixes + Header SupportJoshua Leung
Added support for panning headers using View2D of the header regions (only done for TimeLine, as only that one has buttons on it). Currently, this uses some do_versions magic to initialise the View2D rects required, however, I'm not sure if all the information was safely ported over yet (notably height and position of rects due to alignment issues). In the process, I noticed a few bugs with the current View2D code: * UI_view2d_curRect_validate() is now called after UI_view2d_size_update(), as the size of the 'mask' rect is closely related to the size of the 'cur' rect (especially when zooming is locked). * Fixed a bug in UI_view2d_curRect_validate() which meant that if the 'cur' rect was slightly larger than the 'tot' rect, and keeptot was set, the view would flicker between the two closely related positions.
2008-12-10UI:Brecht Van Lommel
* Added context pointer to function callbacks for buttons and blocks. * Added a uiBlockSetHandleFunc, which will be called with the button return value. This seems kind of redundant with uiBlockSetButmFunc, but the latter uses a2 to pass the value.
2008-12-102.5Ton Roosendaal
- Brought back (most of) buttons in TimeLine window. They don't work yet though! Waiting for Brecht to commit callbacks for menus and ui-blocks - Area headers hilite again when mouse is inside.
2008-12-102.5Ton Roosendaal
Cleanup in area/region management - more intelligence in area management for adding handlers and setting data correct. Space/Region type callbacks only have to do own things. - added option for adding default handlers to areas/regions. (flag in type definition) - ensured that region-types store the minsizes for regions. - added boundbox check for handlers; note that it accepts pointer to boundbox, because handlers don't get reset on area-resizing or view changes. Example: view2d handlers use mask rect. - handlers get now added on correct context levels (example frame change also worked in header) - removed ->refresh() callback. Context refreshing is Listener. - the ->init() is being called on all WM level actions, also after a file read, moving areas, re-opening areas etc. - fixed bug: crash on exit was caused by cleaning up Screen too late. - UI_view2d_size_update() removed from draw callback, is init() - regions now store (winx, winy) subwindow size.
2008-12-10UI: don't use operators anymore for handling user interface events, but ratherBrecht Van Lommel
a special UI handler which makes the code clearer. This UI handler is attached to the region along with other handlers, and also gets a callback when all handlers for the region are removed to ensure things are properly cleaned up. This should fix XXX's in the UI code related to events and context switching. Most of the changes are in interface_handlers.c, which was renamed from interface_ops.c, to convert operators to the UI handler. UI code notes: * uiBeginBlock/uiEndBlock/uiFreeBlocks now takes a context argument, this is required to properly cancel things like timers or tooltips when the region gets removed. * UI_add_region_handlers will add the region level UI handlers, to be used when adding keymap handlers etc. This replaces the UI keymap. * When the UI code starts a modal interaction (number sliding, text editing, opening a menu, ..), it will add an UI handler at the window level which will block events. Windowmanager changes: * Added an UI handler next to the existing keymap and operator modal handlers. It has an event handling and remove callback, and like operator modal handlers will remember the area and region if it is registered at the window level. * Removed the MESSAGE event. * Operator cancel and UI handler remove callbacks now get the window/area/region restored in the context, like the operator modal and UI handler event callbacks. * Regions now receive MOUSEMOVE events for the mouse going outside of the region. This was already happening for areas, but UI buttons are at the region level so we need it there. Issues: * Tooltips and menus stay open when switching to another window, and button highlight doesn't work without moving the mouse first when Blender starts up. I tried using some events like Q_FIRSTTIME, WINTHAW, but those don't seem to arrive.. * Timeline header buttons seem to be moving one pixel or so sometimes when interacting with them. * Seems not due to this commit, but UI and keymap handlers are leaking. It seems that handlers are being added to regions in all screens, also in regions of areas that are not visible, but these handlers are not removed. Probably there should only be handlers in visible regions?
2008-12-092.5Ton Roosendaal
Area Manager: revised how an area subdivision gets managed. Originally the 'spacedata' would store regiondata too, but this already became impractical (like having view2d data in region is useful). So I left that part how it is. See new diagram: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/AreaManager This means that regions in an Area define location/size or constraints for how they get arranged. The "RegionType" which is linked to this defines its functionality. For fun, test, and code validation: two temporary hotkeys added. SKEY: splits current region horizontally SHIFT+S: splits vertically Note - in outliner - that "context" sticks to the Area as whole, the region here only defines view. That's the purpose. :) For two outliners with different context you open 2 areas. Also note that dragging screen-edges shows the region-alignment type (split with percentage).
2008-12-092.5 - Swapped order for adding View2D keymaps in TimeLine so that they can ↵Joshua Leung
still work.
2008-12-082.5Ton Roosendaal
Part one of wrapping up area/region management. Read design doc here: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/AreaManager This commit: - brings keymap storage to WM, based on names/types. This structure allows rna-ifying it too, so you can browse keymaps etc. - creating areas and regions works slightly different now, wich regiontypes stored in areatype. Todo: - better callbacks and structure for defining which handlers need to be added. - using region types to validate regions - proper implementation of local region data - code method for customizing keymaps. Current idea is that you have to indicate an entire keymap to be custom, to prevent too complicated merging problems of default and custom maps (like order, multiple keys for same operator, disabling options, etc).
2008-12-07View2D: Renamed a few API methods to follow standard naming conventions, and ↵Joshua Leung
added define to use when an argument to these methods is irrelevant.
2008-12-05View2D API: Cleaning up API + New MethodsJoshua Leung
* Cleaned up flags defined for View2D, and added some for defining the alignment of the view's data in the 'tot' rect (i.e. which quadrant(s) the view data is allowed to reside in). * These flags are used in the new UI_view2d_totRect_set() function, which sets the new size of the 'tot' rect (i.e. the maximum viewable area). Currently, is only used for Outliner, but channel-lists also require this. * Added API method to reset 'cur' (current viewing region) to 'default' viewing region - UI_view2d_curRect_reset(). Currently, 'keepzoom' is not respected. I'll check on whether this is needed when I recode UI_view2d_status_enforce(), which is badly in need of a cleanup.
2008-12-04View2D: Scrollbar tweaksJoshua Leung
* Added back vertical scale markings for vertical scrollbars. Currently untested (until IPO Editor can be put back in). Also, there was a special exception for the Sequencer, which will need to be checked when the time comes too. * Fixed the display of frame numbers in scrollbars. Was caused by error in using an int, where a float was required (this is one place MSVC gives better warnings than GCC). * Outliner horizontal scrollbar now displays a more useful range. The previous range was based on screen width, not width of content. * Outliner horizontal scrollbar now draws with bevel-highlight line again. Was missed out in a previous commit. * Added simple toggle Frames/Seconds operator to TimeLine to test if the View2D code is working right for this. This uses the same hotkey (TKEY) as it's counterpart (with a menu for input) did in previous incarnations of Blender.
2008-12-032.5Ton Roosendaal
Fun commit for test: the Repeat Last option. Only the split-area Operator is now added on stack, so that's the only one that works. Just split an area, and press F4 to repeat it anywhere.
2008-12-03A couple of small fixes to clear up some warnings.Kent Mein
BOP_Merge2.cpp had same variable name at different scopes so I renamed a couple. resources.c added include that was missing. (This maybe was going to move? the old one was commented out) ed_markers.c initalized a var that needed it. Kent
2008-12-032.5Ton Roosendaal
- Made view2d manipulations redraw on area level - simplified call to send Notifiers: WM_event_add_notifier(bContext *C, int type, int value, void *data) This brings back more control to WM, no context messing within operators. :) Handlers that execute operators will be responsible for delivering correct contextes. In general: should lead to making context not exposed, but only readable via some callbacks.
2008-12-032.5 fixesTon Roosendaal
- View2d bug: it was taking sliders into account for setting the window matrix, which it shouldn't (glViewport does). This caused error offset in drawing, like for current-frame scrolling. - Current frame scrolling in TimeWindow back on window level. (used to crash, but that was fixed in WM) - Made UI_view2d_region_to_view accept ints, no shorts - removed debug function in interface_ops.c
2008-12-03View2D - assorted wip changes (nothing to see here)Joshua Leung
2008-12-02Lots of stuff; couldn't commit in parts because of refactor work.Ton Roosendaal
* Changes in interface/ module This commit brings back the way how buttons/menus work under control of WM event system. The previous implementation extended usage of handlers and operators in an interesting but confusing way. Better to try it first according the design specs. :) Most obviously: - modal-handler operators are not stored anymore in regions/areas/windows. such modal handlers own their operator, and should remove it themselves. - removed code to move handlers from one queue to another. (needs review with brecht!) - WM fix: the API call to remove a modal handler got removed. This was a dangerous thing anyway, and you should leave that to the event system. Now, if a handler modal() call gets a cancel/finish return, it frees itself in event system. WM_event_remove_modal_handler was a confusing call anyway! Todo: - allow button-activate to refresh after using button - re-enable arrow keys for menus (do both after commit) - review return values of operator callbacks in interface_ops.c * Fixes in WM system - Freeing areas/regions/windows, also on quit, now correctly closes running modal handlers - On starting a modal handler, the handler now stores previous area and region context, so they send proper notifiers etc. * Other fixes - Area-split operator had bug, wrong minimal size checking. This solves error when trying to split a very narrow area. - removed DNA_USHORT_FIX from screen_types.h, gave warning - operators didn't get ID name copied when activated, needed for later re-use or saving.
2008-12-02View2D - Some more tweaks...Joshua Leung
* Improved scrollbar drawing a bit more - only cosmetic lines * Added new view2d view-matrix api method to only use 'cur' coordinates on one axis, for use when drawing markers, etc. that need to be glued to a certain time but stay fixed in space in another dimension. This should improve the sitation for drawing markers * To aid testing, adding markers now sets the marker to have frame number as it's "name". This will need to be removed later...
2008-12-01View2D - Zoom + More Scrollbar workJoshua Leung
* Added basic (non-modal) zoom operators that use a uniform scale factor, with zoom centered using the view center as scaling point. Use Scrollwheel up/down and Pad +/- to use this. * Added back the 'button'/bubble for the scrollbars. I've added dark lines on either end of it for some later work on zooming widgets. This is not the final form they'll take. I still need to decide how to handle those scrollbars which act as grid-markers too (showing timescale, etc.), before trying to integrate that with some fancy scrollbar drawing (rounded, etc.) Assorted changes: * Moved vertical scrollbar for Outliner to right hand side * Made Timeline use standard scrollbars, and turned on various clamping options * Fixed ortho-matrix corrections for scrollbars, and added pixel offsets * Made Timeline markers sit more snugly on the scrollbar. They were a bit far out... * Fixed memory leak with view2d keymaps not being freed when Blender exited
2008-12-01View2D - Another WIP commitJoshua Leung
* Start of basic scrollbar drawing. This will be improved. Only Outliner shows these for now, as although the Timeline should show them, the old files didn't have them turned on. * Tidied up the view-panning operator - Fixed naming convention - Added user-adjustable properties (deltax, deltay in screenspace) * Added ctrl-scrollwheel (horizontal) and shift-scrollwheel (vertical) scroll operators. These use the view-panning code too. Unfortunately, I haven't been able to figure out why the WHEELMOUSEDOWN events don't seem to be triggering the operators!
2008-11-30View2D - Initial commit of Pan-View OperatorJoshua Leung
* Moved View2D data from space-data to ARegion (aka regions). This has been done because drawing occurs in regions not areas anymore. The View2D struct is currently stored in the ARegion struct (not as pointer), given that most of the regions in use will be 2D anyway (only the 3d-view's "window" region is the exception). Added version patch code for outliner and timeline only for now. Headers are also likely to need this. * Added separate keymap for View2D operators. All regions that use View2D will need this added. This includes headers too. * Pan view operator (ED_View2D_OT_view_pan), currently works for Outliner and Timeline. Use MMB-drag as before. - It currently doesn't exposed any parameters for redo (via RNA-ID-Props), but only uses some customdata. Suggestions on what these parameters could be are welcomed. - I've yet to implement the necessary axis-locking features for this panning (which is required in Timeline for example to prevent vertical panning, which moves the markers out of view).
2008-11-292.5: work on bringing back SpaceTime optionsTon Roosendaal
- RMB select, also with SHIFT - RMB tweak for translate - SHIFT+D dupli - BKEY border select/deselect - AKEY (de)select all - XKEY delete - GKEY grab Added some XXX comments for future todos, especially for when other spaces come back with time markers. Also added ED_util for putting in all to-be-cleaned cruft Context conflict: input methods for Markers can conflict with other spacetypes. It was solved in pre-2.5 with manually tweaking it all over, but I would prefer one keymap for all marker stuff. Needs some thinking... could be solved with a boundbox check for bottom part of 2d window. Tweak issue: both tweak styles are possible: - Hold mouse button, move, operator ends on mouse release - Hold mouse button, move, operator ends on mouse click Problem is that modally handled operators use fixed keymaps... like ESC, SPACE, ENTER, or press/release mousebutton for 'assign'. There's a lot to say for making this all consistant, or become part of 1 general keymap? Should also be possibe to define 'tweak' defaults for Tablet different than for mouse...
2008-11-27Bugfix: loading a .blend (via commandline now) while current configTon Roosendaal
had more windows, it left the non-active windows empty. The window-match code is unfinished (need to bring all editors back), for now it just follows rule to copy active screen in loaded file to other windows. Also: added time marker icons (wrong location, view2d stuff still) Also: bug in random green/purple area code, stopped at 10 subwindows :)
2008-11-24More testing with new system:Ton Roosendaal
- Added markers (partially) back, ed_markers.c (temporary in spacetime, where to put general stuff like this?), and added ED_markers.h for api. - Mkey in timewindow shows marker (no icon, doesnt work yet). (Adding operators gets easy :) - Noted some conflict for operator storage... with markers being used all over, added it to the screen level. - More todos: view2d is stored in space, for time, etc. With regions we could move this over, but better todo as post 2.5 project. Multiple 2d views in area would be cool though.
2008-11-24RNABrecht Van Lommel
* Disable editable pointers for now, difficult to support well. * Swap parameters in RNA_access.h functions to make it more consistent. * Rename rna members for operators to wmOperatorType.srna, and wmOperator.ptr, to make the distincton a bit clearer. • Removed the RNA_int_default and similar functions, they're too confusing. RNA_property_is_set can still be used to achieve the same goal. * Add functions to create RNA pointers. Some example code for RNA data access and operator properties: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNAExampleCode
2008-11-21RNABrecht Van Lommel
* Added RNA for operators. This still uses ID properties internally, but through the RNA API now. The OP_get/set_* API that was used is replaced by the RNA API. Currently RNA properties for operators are defined at runtime since it means operator registration can be done in a single function. * Changed the existing operators to use this system, I haven't defined user interface names yet though. I also think there need to be some conventions on which properties to expose to make these operators usable in macros, for example if mouse coordinates should be stored or not. * When using ID properties through defined RNA properties, it now checks that the ID property actually matches the RNA property and removes/overwrites it otherwise. This ensures that you can safely get/set arrays for example without having to worry that some external thing may have changed the length. * Documentation now has some information on RNA + ID properties. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
2008-11-13Merge of trunk into blender 2.5:Brecht Van Lommel
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416 Issues: * GHOST/X11 had conflicting changes. Some code was added in 2.5, which was later added in trunk also, but reverted partially, specifically revision 16683. I have left out this reversion in the 2.5 branch since I think it is needed there. http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683 * Scons had various conflicting changes, I decided to go with trunk version for everything except priorities and some library renaming. * In creator.c, there were various fixes and fixes for fixes related to the -w -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done differently. Since this is changed so much, and I don't think those fixes would be needed in 2.5, I've left them out. * Also in creator.c: there was code for a python bugfix where the screen was not initialized when running with -P. The code that initializes the screen there I had to disable, that can't work in 2.5 anymore but left it commented as a reminder. Further I had to disable some new function calls. using src/ and python/, as was done already in this branch, disabled function calls: * bpath.c: error reporting * BME_conversions.c: editmesh conversion functions. * SHD_dynamic: disabled almost completely, there is no python/. * KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled. * text.c: clipboard copy call. * object.c: OB_SUPPORT_MATERIAL. * DerivedMesh.c and subsurf_ccg, stipple_quarttone. Still to be done: * Go over files and functions that were moved to a different location but could still use changes that were done in trunk.
2008-11-11Port of part of the Interface code to 2.50.Brecht Van Lommel
This is based on the current trunk version, so these files should not need merges. There's two things (clipboard and intptr_t) that are missing in 2.50 and commented out with XXX 2.48, these can be enabled again once trunk is merged into this branch. Further this is not all interface code, there are many parts commented out: * interface.c: nearly all button types, missing: links, chartab, keyevent. * interface_draw.c: almost all code, with some small exceptions. * interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators, making it non-blocking. * interface_regions: this is a part of interface.c, split off, contains code to create regions for tooltips, menus, pupmenu (that one is crashing currently), color chooser, basically regions with buttons which is fairly independent of core interface code. * interface_panel.c and interface_icons.c: not ported over, so no panels and icons yet. Panels should probably become (free floating) regions? * text.c: (formerly language.c) for drawing text and translation. this works but is using bad globals still and could be cleaned up. Header Files: * ED_datafiles.h now has declarations for datatoc_ files, so those extern declarations can be #included instead of repeated. * The user interface code is in UI_interface.h and other UI_* files. Core: * The API for creating blocks, buttons, etc is nearly the same still. Blocks are now created per region instead of per area. * The code was made non-blocking, which means that any changes and redraws should be possible while editing a button. That means though that we need some sort of persistence even though the blender model is to recreate buttons for each redraw. So when a new block is created, some matching happens to find out which buttons correspond to buttons in the previously created block, and for activated buttons some data is then copied over to the new button. * Added UI_init/UI_init_userdef/UI_exit functions that should initialize code in this module, instead of multiple function calls in the windowmanager. * Removed most static/globals from interface.c. * Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it would integrate here? * Currently only full window redraws are used, this should become per region and maybe per button later. Operators: * Events are currently handled through two operators: button activate and menu handle. Operators may not be the best way to implement this, since there are currently some issues with events being missed, but they can become a special handler type instead, this should not be a big change. * The button activate operator runs as long as a button is active, and will handle all interaction with that button until the button is not activated anymore. This means clicking, text editing, number dragging, opening menu blocks, etc. * Since this operator has to be non-blocking, the ui_do_but code needed to made non-blocking. That means variables that were previously on the stack, now need to be stored away in a struct such that they can be accessed again when the operator receives more events. * Additionally the place in the ui_do_but code indicated the state, now that needs to be set explicit in order to handle the right events in the right state. So an activated button can be in one of these states: init, highlight, wait_flash, wait_release, wait_key_event, num_editing, text_editing, text_selecting, block_open, exit. * For each button type an ui_apply_but_* function has also been separated out from ui_do_but. This makes it possible to continuously apply the button as text is being typed for example, and there is an option in the code to enable this. Since the code non-blocking and can deal with the button being deleted even, it should be safe to do this. * When editing text, dragging numbers, etc, the actual data (but->poin) is not being edited, since that would mean data is being edited without correct updates happening, while some other part of blender may be accessing that data in the meantime. So data values, strings, vectors are written to a temporary location and only flush in the apply function. Regions: * Menus, color chooser, tooltips etc all create screen level regions. Such menu blocks give a handle to the button that creates it, which will contain the results of the menu block once a MESSAGE event is received from that menu block. * For this type of menu block the coordinates used to be in window space. They are still created that way and ui_positionblock still works with window coordinates, but after that the block and buttons are brought back to region coordinates since these are now contained in a region. * The flush/overdraw frontbuffer drawing code was removed, the windowmanager should have enough information with these screen level regions to have full control over what gets drawn when and to then do correct compositing. Testing: * The header in the time space currently has some buttons to test the UI code.
2008-11-11Various changes made in the process of working on the UI code:Brecht Van Lommel
* Added functions to generate Timer events. There was some unfinished code to create one timer per window, this replaces that with a way to let operators or other handlers add/remove their own timers as needed. This is currently delivered as an event with the timer handle, perhaps this should be a notifier instead? Also includes some fixes in ghost for timer events that were not delivered in time, due to passing negative timeout. * Added a Message event, which is a generic event that can be added by any operator. This is used in the UI code to communicate the results of opened blocks. Again, this may be better as a notifier. * These two events should not be blocked as they are intended for a specific operator or handler, so there were exceptions added for this, which is one of the reasons they might work better as notifiers, but currently these things can't listen to notifier yet. * Added an option to events to indicate if the customdata should be freed or not. * Added a free() callback for area regions, and added a free function for area regions in blenkernel since it was already there for screens and areas. * Added ED_screen/area/region_exit functions to clean up things like operators and handlers when they are closed. * Added screen level regions, these will draw over areas boundaries, with the last created region on top. These are useful for tooltips, menus, etc, and are not saved to file. It's using the same ARegion struct as areas to avoid code duplication, but perhaps that should be renamed then. Note that redraws currently go correct, because only full window redraws are used, for partial redraws without any frontbuffer drawing, the window manager needs to get support for compositing subwindows. * Minor changes in the subwindow code to retrieve the matrix, and moved setlinestyle to glutil.c. * Reversed argument order in WM_event_add/remove_keymap_handler to be consistent with modal_handler. * Operators can now block events but not necessarily cancel/finish. * Modal operators are now stored in a list in the window/area/region they were created in. This means for example that when a transform operator is invoked from a region but registers a handler at the window level (since mouse motion across areas should work), it will still get removed when the region is closed while the operator is running.
2008-10-082.5 Branch: use themes for drawing the time space, and makeBrecht Van Lommel
view2d grid code a bit nicer.
2008-06-112.5 BranchBrecht Van Lommel
========== * Changed wmOperatorType, removing init/exit callbacks and adding cancel callback, removed default storage in favor of properties. Defined return values for exec/invoke/modal/cancel. * Don't allocate operator on the stack, and removed operator copy for handlers. Now it frees based on return values from callbacks, and just keeps a wmOperator on the heap. Also it now registers after the operator is fully finished, to get the correct final properties. * Changed OP_get_* functions to return 1 if the property is found and 0 otherwise, gives more readable code in my opinion. Added OP_verify_* functions to quickly check if the property is available and set if it's not, that's common for exec/invoke. * Removed WM_operatortypelist_append in favor of WM_operatortype_append which takes a function pointer instead of a list, avoids macro's and duplicating code. * Fix a crash where the handler would still be used while it was freed by the operator. * Spacetypes now have operatortypes() and keymap() callbacks to abstract them a bit more. * Renamed C->curarea to C->area for consistency. Removed View3D/View2D/ SpaceIpo from bContext, seems bad to keep these. * Set context variables like window/screen/area/region to NULL again when leaving that context, instead of leaving the pointers there. * Added if(G.f & G_DEBUG) for many of the prints, makes output a bit cleaner and easier to debug. * Fixed priority of the editors/interface module in scons, would otherwise give link errors. * Added start of generic view2d api. * Added space_time with some basic drawing and a single operator to change the frame.