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-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-11* Compile fix for RNA + makefiles.Brecht Van Lommel
* Fix for bug in collection string lookup function.
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-11-11* RNA: utility function to retrieve strings. It will use a fixedBrecht Van Lommel
size buffer if it's big enough, and otherwise allocate memory. * Added BLI_dynstr_appendf() to construct strings easily in printf style, this should make it easier to construct menu strings for example.
2008-11-07* fix for typo found by brechtNathan Letwory
2008-11-07=== SCons ===Nathan Letwory
* merge the recent scons changes from trunk, so this means that the same rules now apply: - scons-local available - platform default configs updated - check your user-config.py if you have made a full copy of default config Note: BGE and blenderplayer still not working, but that is normal ;) (so turn them off!)
2008-11-07RNABrecht Van Lommel
* Added more error prints for wrong definitions, for cases that would laters cause problems compiling or crash at runtime, and also made messages more clear. * Added some skeleton code for main/ID/mesh/vertex types for testing. * Added support for automatic arrays as collections using SDNA. * Changed how pointers to data work. Now they are always wrapped in a PointerRNA struct, which contains the data pointer and type, and also the data pointer and type of the ID datablock that this belongs to, since for example a vertex on it's own may not have enough information for some operations, it also needs the mesh. * Added some code for defining dependencies with RNA, and looking up data with paths like: scenes[0].objects["Cube"].data.verts[7].co. Note sure either will end up being used, this is experimental. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
2008-11-01RNA compile error and warning fixes for MSVC.Brecht Van Lommel
2008-11-01RNA / Data APIBrecht Van Lommel
This is the first code for the Data API, also known as RNA system in the 2.5 Branch. It does not include a user interface, and only wraps some Scene properties for testing. It is integrated with Scons and Makefiles, and compiles a 'makesrna' program that generates an RNA.c file. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA The changes are quite local, basically adding a makesrna module which works similar to the makesdna module. The one external change is in moving genfile.c from blenloader to the makesdna module, so that it can be reused by the RNA code. This also meant changing the DNA makefiles. It seems to be doing dependencies correct still in my tests, but if there is an issue with the DNA not being rebuilt this commit might be the one causing it. Also it seems for scons the makesdna and makesrna modules are compiling without warnings. Not a new issue but this should be fixed. The RNA code supports all types as defined in the Data API design, so in that sense it is fairly complete and I hope that aspect will not have to change much. Some obviously missing parts are context related code, notify() functions for updates and user defined / ID properties.
2008-10-082.5 Branch: use themes for drawing the time space, and makeBrecht Van Lommel
view2d grid code a bit nicer.
2008-10-06whitespace commitNathan Letwory
2008-10-06* use env.Clone() instead of deprecated env.Copy()Nathan Letwory
2008-10-06* merge main SConstruct and some of the utility scripts for our scons build ↵Nathan Letwory
from trunk. Note: I'll be working on improving our scons build environment in this branch Note2: I'll be upgrading our scripts to work fully with scons 1.0 (and possibly later)
2008-10-032.5 Branch: added WM_report and WM_reportf functions for reportingBrecht Van Lommel
information, warnings and errors.
2008-06-24patch from skejoe for gcc 4.3 compatibilityCampbell Barton
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 Branch: makefile update for last commit, patch provided by Diego, thanks!Brecht Van Lommel
2008-06-11* small fix for compiling with scons 0.98.xNathan Letwory
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-22== join areas operator ==Andrea Weikert
- draw arrow in area that will removed and draw area that will be kept lighter (change from trunk: without arrow) - not using notifications yet, but uses flag in ScrArea to determine draw type for area. (might be worth discussing) - experimental: swapping of areas extended a bit, which allows user to choose area a bit more freely
2008-01-21*remove superfluous glEnd(); - made func internal too.Nathan Letwory
2008-01-21* grow AZone sizeNathan Letwory
* remove ^M's
2008-01-20Changes to the "join area" operator.Diego Borghetti
This is a patch by Michael Fox (mfoxdogg) that make more easy join two are, just RMB+Alt in the "origin" area, drag the mouse to the "target" area and release the mouse. Note that this is not a "final mouse-bind" for the join operator, just an easy and simple option for test in this early stage of 2.5. Other note: maybe it's a good idea add azones here ?
2008-01-20More change to the gesture manager.Diego Borghetti
After check this a little more I make some changes to the API and now work on the following form: WM_gesture_init(C, type); while() { /* handler event, etc */ /* if something change. */ if(need_update) { /* update the gesture data and notify about it. */ WM_gesture_update(C, data); WM_event_add_notifier (.. WM_NOTE_GESTURE_CHANGE ..); } } WM_gesture_end(C, type); Another of the change is that now the gesture data is a link list in the window struct, so we can have multiples "gestures" (but of different type) at the same time. Also take care that the "gesture data" is reusable, that mean that only alloc it 1 time and use in all the place, that is why don't support multiple gesture of the same type, but of course that can be change.
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-18* clean up ^MNathan Letwory
* make default size of action zones smaller (still draw them, but that could be also made optional).
2008-01-17game engine wasnt compilingCampbell Barton
2008-01-17Fix uninitited list pointer when duplicate an area.Diego Borghetti
2008-01-17* First working version of a new split tool for areas.Nathan Letwory
- LMB+drag from lower left action zone. LMB release confirms - RMB or ESC cancel. TODO: - subdiv (drag to center)
2008-01-17* don't copy azones- these are initiated runtime always.Nathan Letwory
2008-01-17* make sure we don't crash on window duplicate, or .B.blend read. There is ↵Nathan Letwory
still a bug with duplicate, but I'm working on it.
2008-01-17* Start ActionZone support for areas. This is bScreen level stuff to be able ↵Nathan Letwory
to do funky stuff. Right now 2 AZones are defined for each new ScrArea, and mouse over is now detected. Enter ugly triangle.
2008-01-16* rearrange screen level drawing code a bit in preparation for tests.Nathan Letwory
2008-01-16* I gotta remember my mantra for realNathan Letwory
"first compile, then commit". Of course, if compile fails, don't commit.
2008-01-16* undutchification of printf'sNathan Letwory
* remove unnecessary printf's * clean a bit, some doc strings
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* check for NULL. Could crash if passed parameters were NULL.Nathan Letwory
2008-01-15* add exit app with CTRLKEY+QKEY.Nathan Letwory
2008-01-15* area split:Nathan Letwory
- prevent a few more cases of Potential Crash. - tweak moving stuff.
2008-01-15More "data types" for the Operator property system.Diego Borghetti
Now you can set/get: float, arrays (int and float) and string. The only special function is OP_get_string, it is special because return a pointer to the IDProperty data, so you can't change/resize/free the string. It's possible "fix" this with: 1) Return a "const char" 2) Return a duplicate string All this new function are not in use yet, but i make a simple test with the "move areas" operator (add a property of every type and then print the result in the other size) and work fine, more test are welcome. Other thing to check is the new OP_free_property function, because this properties are only local to the operator, i choice free all this in the "exit callback" of every operator (only move areas have property now), so comment about this are welcome too :) Also add some notes to the WM_api.h file.
2008-01-14* fix for crash when mouse cursor changed areas. Not enough was tested, so ↵Nathan Letwory
sometimes we got invalid edges.
2008-01-14Operators: Split AreaNathan Letwory
This commit adds split area to the window/screen manager. - RMB down on area edge activates - mouse move interactively moves areas through new edge. - RMB up to confirm action - ESCKEY or LMB to cancel. This still crashes in some situations, but I'm on it! Also will start using new operator property system by bdiego
2008-01-14New API to access Operator properties.Diego Borghetti
This is a simple API around IDProperty to store properties in the Operator, it is really simple and this first commit just add support for IDP_INT data type. Take care that this "properties" are not save yet and you get some "Error totblock" more with this. I add some notes to the WM_api.h file, please check this, comment and ideas are welcome.
2008-01-13Applied a couple sculpt/multires fixes from trunk to blender2.5.Nicholas Bishop
2008-01-11Reverting changes made yesterday to Makefile... (Its really messed up,Kent Mein
Going to do it over again from scratch) Kent
2008-01-11The python lib name should be 'bf_python' instead of 'blender_python'Chris Want
when linking.
2008-01-11Fixed typo from merge yesterday.Kent Mein
Kent
2008-01-10Cleaned up some things, more work to do here but its a little simpler now.Kent Mein
Kent
2008-01-10Change vector structs from 3 to 4 so things are aligned for 64bit machines.Kent Mein
Kent
2008-01-10Add more memory clearing on file read for WindowManager.Ton Roosendaal