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
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-15Completely move freeing flag to report, operator flag is uneeded.Martin Poirier
Also bugfix for py operators. Reports need to be kept alive when operator is registered.
2009-09-14Bugfix with py operator api and modal operators. Modal operators would keep ↵Martin Poirier
a reference to Reports locally allocated in the api functions, which would crash and burn later when the operator would actually stop. This commit introduces a flag at the Reports level that can be used to indicate that it needs to be freed (on top of the flag already existing in the operator, which I guess could be removed). Reports for operators called through python are only persisted if they indicate that they are running modal.
2009-09-142.5 mesh cleanup: merge tools all work againJoseph Eagar
2009-09-052.5Brecht Van Lommel
Notifiers --------- Various fixes for wrong use of notifiers, and some new notifiers to make things a bit more clear and consistent, with two notable changes: * Geometry changes are now done with NC_GEOM, rather than NC_OBJECT|ND_GEOM_, so an object does need to be available. * Space data now use NC_SPACE|ND_SPACE_*, instead of data notifiers or even NC_WINDOW in some cases. Note that NC_SPACE should only be used for notifying about changes in space data, we don't want to go back to allqueue(REDRAW..). Depsgraph --------- The dependency graph now has a different flush call: DAG_object_flush_update(scene, ob, flag) is replaced by: DAG_id_flush_update(id, flag) It still works basically the same, one difference is that it now also accepts object data (e.g. Mesh), again to avoid requiring an Object to be available. Other ID types will simply do nothing at the moment. Docs ---- I made some guidelines for how/when to do which kinds of updates and notifiers. I can't specify totally exact how to make these decisions, but these are basically the guidelines I use. So, new and updated docs are here: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04allow execution mode to be given as an argument to operators from python ↵Campbell Barton
(requested by algorith) example. bpy.ops.tfm.rotate('INVOKE_REGION_WIN', pivot=(0,1,2), ......) bpy_array.c - was too strict with types, 0 should be allowed as well as 0.0 in a float array.
2009-08-162.5/RNA:Nicholas Bishop
* Added Context access to RNA_property_as_string. This is needed for doing a Python call to the object mode set operator, which has a dynamic enum property that needs context.
2009-08-02fix for crash in background mode.Campbell Barton
2009-07-30better blender doesnt look idiot for siggraph with tips wider then the screen.Campbell Barton
only show operator args in the tooltip that are different from the defaults.
2009-07-30- include operator commands in tooltips (needs sanitizing for transform ↵Campbell Barton
operators, there are massive :|) - WM_operator_pystring can now be used with an operator type and properties (rather then a wmOperator instance) - removed menus from file selector
2009-07-292.5Ton Roosendaal
Operator goodies! --- Macro operators Operators now can consist of multiple operators. Such a macro operator is identical and behaves identical to other opererators. Macros can also be constructed of macros even! Currently only hardcoded macros are implemented, this to solve combined operators such as 'add duplicate' or 'extrude' (both want a transform appended). Usage is simple: - WM_operatortype_append_macro() : add new operatortype, name, flags - WM_operatortype_macro_define() : add existing operator to macro (Note: macro_define will also allow properties to be set, doesnt work right now) On converting the macro wmOperatorType to a real operator, it makes a list of all operators, and the standard macro callbacks (exec, invoke, modal, poll) just will use all. Important note; switching to a modal operator only works as last in the chain now! Macros implemented for duplicate, extrude and rip. Tool menu works fine for it, also the redo hotkey F4 works properly. --- Operator redo fix The operators use the undo system to switch back, but this could give errors if other actions added undo pushes (buttons, outliner). Now the redo for operator searches back for the correct undo level. This fixes issues with many redos. Note for brecht: removed the ED_undo_push for buttons... it was called on *every* button now, which is probably too much? For example, using the 'toolbar' redo also caused this...
2009-07-18initialize keymaps after python so python keymaps, solves the problem of ↵Campbell Barton
keymaps complaining about python operators not existing, but at the expense of some annoying init flags/functions. :/ Brecht/Ton you may want to check that C->data.py_init is a good place to store this.
2009-07-17- Scrollbars for the console (use View2D functions)Campbell Barton
- Set View2D operators not to register, got in the way a lot with the console. - Made autocomplete Ctrl+Enter so Tab can be used. - Should work with python 2.5 now. (patch from Vilda) - Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo. - Store the report message length in the report so calculating the total height including word wrap is not so slow.
2009-07-16Console Space TypeCampbell Barton
* interactive console python console. * display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them, eventually it should be possible to select commands and make macto/tools from them. Example use of autocomp. b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc. basic instructions are printed when opening the console. Details... * Console exec and autocomp are done with operators written in python. * added CTX_wm_reports() to get the global report list. * The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA. * changed report types flags for easier display filtering. * added report type RPT_OPERATOR * logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw. * RnaAPI context.area.tag_redraw() to redraw the current area from a python operator. Todo... * better interactions with the console, scrolling, copy/paste. * the text displayed doesnt load back. * colors need to be themed. * scroll limit needs to be a user pref. * only tested with cmake and scons.
2009-06-262.5Ton Roosendaal
Part one (of probably many :) of Operator review/validation. Nothing final nor defined, it's reseach :) - Added tool buttons in "Toolbar" (Tkey). Just four examples for objectmode, and six for mesh editmode. (Review in progress is operator internal state vs context, what do redo exactly, undo vs redo syncing, when op->invoke or not, etc. This has to be pinned down exactly and frozen asap) - On undo, clear redo-operator-stack for now (won't work) - Added call to better detect active/current view3d region. ED_view3d_context_rv3d(C) - Fixed some operators that missed correct redo (add-prim etc). Later more fun!
2009-05-30* fix for resetting window size on builtin b.blend startup.Matt Ebb
I think this should work ok for now, but would really appreciate someone who knows the windowmanager code well to take a look at it :)
2009-05-30* Updated blender 2.5 default setupMatt Ebb
Simplified and started from a clean slate, without much of the hidden existing space data that was hanging around in the old one. One issue I found is that saving the startup file from Blender 2.5 also saves the window size and location. This means the version I just saved would open up strangely on other screen sizes/setups. I added code to reset this to default when loading it up from the version compiled into the Blender binary, but perhaps Ton/ Brecht might want to check the diff.
2009-02-202.5Ton Roosendaal
Bugfix: on closing wm, it was using a free'd pointer to screen.
2009-02-182.5Ton Roosendaal
Several things in one commit; could not split this up easily, one job invoked another, and so on. :) - Added pulldowns for save/load .blend file in top bar. - To enable "Save" without further popups (save over) I've added a signaling function in window header to indicate a succesful save. - On any undo push it now signals 'file changed'. This goes by notifiers nicely, but now registers only the undopushes, which is quite unreliable. "Changed" state shows in header as "Blender*" and for OSX with the standard close button black dot. - Made screencast show a button in top bar indicating such, and allowing quit. No hotkey for quit yet... but ESC will keep casting now. - Fixed new BLF_init(), which should be in WM_init() and not on any .B.blend read. - Fixed CTRL+F3 "Save Screenshot", which was still using old fileselect code.
2009-02-072.5Ton Roosendaal
- Screen browse button back - Several fixes in using screens in more windows. Still has loose ends, but things are definitely more stable!
2009-02-072.5Ton Roosendaal
- Added back CTRL+X "reload start-up file". (Original name 'erase all' is a bit misleading, but we can go over all naming conventions later :) - Added memfree for triple buffer data.
2009-02-062.5: fix triple buffer memory leak on exit.Brecht Van Lommel
2009-01-272.5Ton Roosendaal
Compositor now uses threaded jobs. - updates happen per preview node! Check this file for fun: http://www.blender.org/bf/composite_image.blend (any compo node could get preview!) - had to ensure the composite data gets fully copied before it executes thread, so editing is not frustrated. - put back node buttons (missing init) - added WM_jobs api call to check for running job, illustrated with red light icon in 'use nodes' button. - added another callback to WM_jobs, to initialize. use this init to ensure you only do it when job really starts. - added an extra notifier option for WM_jobs, to signal finished job (like redraw image view) - fixed file read error, it copied the screen it read, instead of using it. - commented out annoying prints for missing ops in imagewin
2009-01-232.5Ton Roosendaal
File reading of 2.50 files fixed. - it now exits nicely from queues without using free'd memory (checks CTX_wm_window(C) to be NULL) - code that matched current (ghost) window with new situation lacked setting a pointer good. Overall cleaned some parts too; like context clears now all wm related pointers when you set a new wm, window or area.
2009-01-232.5: WM CompositingBrecht Van Lommel
* Triple Buffer is now more complete: - Proper handling of window resize, duplicate, etc. - It now uses 3x3 textures (or less) if the power of two sizes do not match well. That still has a worst case wast of 23.4%, but better than 300%. - It can also use the ARB/NV/EXT_texture_rectangle extension now, which may be supported on hardware that does not support ARB_texture_non_power_of_two. - Gesture, menu and brushe redraws now require no redraws at all from the area regions. So even on a high poly scene just moving the paint cursor or opening a menu should be fast. * Testing can be done by setting the "Window Draw Method" in the User Preferences in the outliner. "Overlap" is still default, since "Triple Buffer" has not been tested on computers other than mine, would like to avoid crashing Blender on startup in case there is a common bug, but it's ready for testing now. - For reference "Full" draws the full window each time. - "Triple Buffer" should work for both swap copy and swap exchange systems, the latter still need the -E command line option for "Overlap". - Resizing and going fullscreen still gives flicker here but no more than "Full" drawing. * Partial Redraw was added. ED_region_tag_redraw_partial takes a rect in window coordinates to define a subarea of the region. On region draw it will then set glScissor to a smaller area, and ar->drawrct will always be set to either the partial or full window rect. The latter can then be used for clipping in the 3D view or clipping interface drawing. Neither is implemented yet.
2009-01-092.5Ton Roosendaal
Vertex Paint back! Added WM level "paint cursor" system, which manages a custom painting cursor for tools or modes. - Activate it with WM_paint_cursor_activate(). That function wants two callbacks, a poll(C) to check whether there's a cursor in given context and ARegion, and a draw(C, x, y) which gets called when appropriate. - While paintcursor is active, the WM handles necessary redrawing events for all regions, also to nicely clear the cursor on region exit. - WM_paint_cursor_activate returns a handle, which you have to use to end the paint cursor. This handle also means you can register as many custom cursors as you want. At the moment, vertex paint mode registers only a mousemove handler, all other events are still normally handled. This is stuff for the future todo.
2009-01-032.5: fix "repeat last", and display of operator propertiesBrecht Van Lommel
in rna outliner.
2009-01-01RNABrecht Van Lommel
* Object has some more properties wrapped, mostly game related. * Scene frame changes now send a notifier. * Added functions to create/free operator properties for calling operators. This also simplifies some duplicated code that did this. Ideally though this kind of thing should use the properties pointer provided by buttons and keymap items. Example code: PointerRNA ptr; WM_operator_properties_create(&ptr, "SOME_OT_name"); RNA_int_set(&ptr, "value", 42); WM_operator_name_call(C, "SOME_OT_name", WM_OP_EXEC_DEFAULT, &ptr); WM_operator_properties_free(&ptr);
2008-12-31RNABrecht Van Lommel
* Store RNA collections different in ID properties, using a generic ID property array, using the patch provided by Joe. * Fix bug accessing registered operator properties in the wm from the outliner. * In the outliner, only use the RNA icon for RNA data, and use dot again for unknown icon. * Also, show pointer properties data in the second column, and auto expand two levels when opening them. * Added small RNA_struct_defined_properties function to get only the defined properties without builtin and undefined id properties (for py operators).
2008-12-292.5: Error reportingBrecht Van Lommel
* Added a report list to operator, to which they can report errors and warnings. When the operator ends, it will display them with a popup. For python these should become exceptions when calling operators. * Added a function to make a popup menu from a report list. * Also added a utility function to prepend a string before the reports to indicate what they relates to. Also made the report functions used BLI_dynstr to simplify the code. * Made file reading and writing report errors to the user again using this system, also replacing the left over uncommented bad level error() calls.
2008-12-242.5Ton Roosendaal
Fix: popup menus were not freeing operators. Made a new Popup menu call for this case: uiPupmenuOperator(C, maxrow, op, propname, menustr); It will set enum "propname" to the menu item and call operator, register it optionally and free it. Use it in "invoke" calls. Next: automatic menu generating for enum properties!
2008-12-222.5Ton Roosendaal
Better implementation of own window timers, not using ghost. That makes blender's WM nice in control, and gives callers of timers the opportunitie to evaluate time passed since previous step. This system also only generates one timer event per main loop (events - handlers - notifiers - draw) Small fix: allow keymap modifier to give KM_ANY to ignore modifier keys, this to have TIMER keymap work.
2008-12-182.5Brecht Van Lommel
Context API This adds the context API as described here. The main practical change now is that C is not longer directly accessible but has to be accessed through accessor functions. This basically adds the implementation of the API and adaption of existing code with some minor changes. The next task of course is to actually use this design to cleanup of bad level calls and global access, in blenkernel, blenloader. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context Error, Warning and Debug Info Reporting This adds the error reporting API as described here. It should help clean up error() calls in non-ui code, but eventually can become used for gathering messages for a console window, and throwing exceptions in python scripts when an error happens executing something. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports
2008-12-152.5: added support for setting RNA properties in keymap item,Brecht Van Lommel
which will then be set when the operator is called, example: kmi= WM_keymap_add_item(keymap, "ED_SCR_OT_region_split", SKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "dir", 'h'); kmi= WM_keymap_add_item(keymap, "ED_SCR_OT_region_split", SKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "dir", 'v'); There is a hack I had to do here, since properties are defined as member of wmOperator, will try to fix later, committing now so it can be used already.
2008-12-082.5Ton Roosendaal
Minor cleanups.
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-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-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-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-19Code shuffle to make a bit more structure.Ton Roosendaal
- operator definitions, callbacks, registry to WM and handlers for it are now always in a file xxxx_ops.c or xxxx_operators.c, in the bottom you will find the registry and handler code. - fixed some confusing naming conventions "rip_area vs area_join" etc. Now stick to convention to first name subject, then operation (like UI :). So it's area_rip, screen_add, and so on. - Nicely put exported calls (outside module) together in bottom: this using names such as ED_screen_duplicate(). - Moved Operator-Property API to new C file.
2008-11-192.5: gesture code in WMTon Roosendaal
- Simplified and cleaned previous border code It was a bit too complex, too many data manipulations Original idea was to have WM API calls to manage border, circle, lines, lasso, etc. This now means that WM provides callbacks for custom operators, so it's very easy to make them. Check bottom of screen_edit.c for an example. Currently two borders were coded; with and without cross hair. Press Bkey in any area-region to test it (note: time window has wrong matrix!) Some specs to note: - gestures are in region space, and draw 'over'. That latter still needs some work when we do real composites. - only the active region is redrawn. - on todo is the generic gesture engine for 'tweak' or like how currently grab gestures in Blender work. These will be configurable per area-region, and WM then will send the proper "Gesture Event" with properties (N, S, E, W, etc) to which you then can assign operators. Such events will be generated with low priority, so other handlers who swallowed mouse events have preference.
2008-11-18Cleanup of area-rip operatorTon Roosendaal
- moved from WM to Screen code (it uses active area) - less code :) result of cleaning some calls - added WM_window_open() to WM API for this - now opens new window on top of area, and leaves old screen unaffected (simple, atomic, the 'do not think for user' convention :)
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-10-032.5 Branch: added WM_report and WM_reportf functions for reportingBrecht Van Lommel
information, warnings and errors.
2008-06-19== Rip Area into new Window Operator ==Andrea Weikert
- operator that rips current area into new window - implemented on the window level. - sets C->area in current context if necessary == fix == - small bugfix: missing return in WM_event_add_keymap_handler
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.
2008-01-19New "Gesture Manager" system.Diego Borghetti
This is a first implementation of the "gesture manager" system, the idea is put the WM in a automatic draw mode so we can implement different "Gesture types" to draw different class of data (lasso, bound box, etc). The gesture data is passed through the data field of the notifiers, i think that we can change this to something like: WM_gesture_init(C, data); /* put the data in the context. */ while() { /* send WM_NOTE_GESTURE_CHANGED to update screen */ } /* send event and free the data in the context. */ WM_gesture_end(C); Also i add a new operator and event to test the gesture manager. The new operator is the "border select" function, just press BKEY in the window and LMB or ESCKEY to exit. In the case of LMB you can see a print in the console about the BORDERSELECT event. All this still need a lot of work, comment are welcome.
2008-01-15Operators: Join AreasAndrea Weikert
add split area to screen manager - RMB+ALT down on area edge activates - mouse move interactively to area that is to be removed - LMB to confirm, ESC to cancel TODO: - notifications for interactive drawing to mark area to remove Some fixes - uninitialized var warning. - exit function of operators need to run before modal handler is removed if operator is used there. - replaced MEM_mallocN with MEM_callocN to get rid of uninitialized mem for wmOperator. - respect return value of wm_handler_operator_call() and break out of operator handling.
2008-01-15* add exit app with CTRLKEY+QKEY.Nathan Letwory